種類
ライブラリ
- English (24)
- ビルトイン (4056)
-
bigdecimal
/ util (7) - csv (84)
- delegate (12)
- digest (12)
- e2mmap (54)
- erb (48)
- etc (36)
- fiddle (12)
-
fiddle
/ import (24) - forwardable (72)
- getoptlong (24)
-
irb
/ extend-command (12) - json (228)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - logger (1)
-
minitest
/ unit (1) - monitor (12)
-
mutex
_ m (36) -
net
/ http (48) -
net
/ imap (12) -
net
/ pop (24) - objspace (48)
- observer (12)
- openssl (1140)
- optparse (192)
- pp (36)
- psych (55)
- rake (48)
- rdoc (12)
-
rdoc
/ anon _ class (12) -
rdoc
/ class _ module (12) -
rdoc
/ code _ object (12) -
rdoc
/ context (84) -
rdoc
/ generator / json _ index (12) -
rdoc
/ known _ classes (12) -
rdoc
/ markup (24) -
rdoc
/ normal _ class (12) -
rdoc
/ parser (12) -
rdoc
/ single _ class (12) -
rdoc
/ stats (24) -
rdoc
/ top _ level (48) - resolv (48)
-
rexml
/ document (24) -
rexml
/ streamlistener (12) -
ripper
/ filter (12) -
rubygems
/ digest / digest _ adapter (12) -
rubygems
/ digest / md5 (12) -
rubygems
/ digest / sha1 (12) -
rubygems
/ digest / sha2 (12) -
rubygems
/ ext / builder (12) -
rubygems
/ gem _ openssl (24) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ version (12) - set (27)
-
shell
/ command-processor (6) - singleton (12)
- socket (72)
- thread (2)
- timeout (49)
- tracer (84)
- tsort (93)
- uri (24)
-
webrick
/ httpauth / authenticator (24) -
webrick
/ httpauth / userdb (12) -
webrick
/ httpresponse (12) -
webrick
/ httpservlet / abstract (72) -
webrick
/ httpservlet / filehandler (12) -
webrick
/ httpstatus (12) -
webrick
/ httputils (96) -
win32
/ registry (228) - win32ole (96)
クラス
-
ARGF
. class (912) - Array (60)
- BasicObject (144)
- BigDecimal (12)
- CSV (84)
- Class (100)
- Complex (12)
- Data (6)
- Date (12)
- DateTime (12)
- Dir (72)
- ERB (36)
-
Enumerator
:: Lazy (18) -
Etc
:: Passwd (24) - Exception (24)
- FalseClass (60)
- File (60)
-
Gem
:: DigestAdapter (12) -
Gem
:: Ext :: Builder (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: Version (12) - GetoptLong (24)
- Hash (79)
- IO (60)
- Integer (12)
-
JSON
:: Parser (24) -
JSON
:: State (24) - Method (213)
-
MiniTest
:: Unit :: TestCase (1) - Module (732)
- NameError (10)
-
Net
:: HTTP (24) -
Net
:: HTTPResponse (24) -
Net
:: IMAP (12) -
Net
:: POP3 (24) - NilClass (170)
- Object (492)
-
OpenSSL
:: ASN1 :: ASN1Data (36) -
OpenSSL
:: ASN1 :: BMPString (24) -
OpenSSL
:: ASN1 :: BitString (24) -
OpenSSL
:: ASN1 :: Boolean (24) -
OpenSSL
:: ASN1 :: Enumerated (24) -
OpenSSL
:: ASN1 :: GeneralString (24) -
OpenSSL
:: ASN1 :: GeneralizedTime (24) -
OpenSSL
:: ASN1 :: GraphicString (24) -
OpenSSL
:: ASN1 :: IA5String (24) -
OpenSSL
:: ASN1 :: ISO64String (24) -
OpenSSL
:: ASN1 :: Integer (24) -
OpenSSL
:: ASN1 :: Null (24) -
OpenSSL
:: ASN1 :: NumericString (24) -
OpenSSL
:: ASN1 :: ObjectId (24) -
OpenSSL
:: ASN1 :: OctetString (24) -
OpenSSL
:: ASN1 :: PrintableString (24) -
OpenSSL
:: ASN1 :: Sequence (24) -
OpenSSL
:: ASN1 :: Set (24) -
OpenSSL
:: ASN1 :: T61String (24) -
OpenSSL
:: ASN1 :: UTCTime (24) -
OpenSSL
:: ASN1 :: UTF8String (24) -
OpenSSL
:: ASN1 :: UniversalString (24) -
OpenSSL
:: ASN1 :: VideotexString (24) - OptionParser (192)
- PP (12)
- Proc (26)
-
RDoc
:: CodeObject (12) -
RDoc
:: Context (84) -
RDoc
:: Generator :: JsonIndex (12) -
RDoc
:: Markup (12) -
RDoc
:: Parser (12) -
RDoc
:: Stats (24) -
RDoc
:: TopLevel (48) -
REXML
:: CData (24) - Random (2)
- Range (24)
- Rational (12)
- Regexp (24)
-
Resolv
:: DNS (36) -
RubyVM
:: InstructionSequence (12) - Set (12)
-
Shell
:: CommandProcessor (6) - Socket (36)
- String (12)
- Struct (60)
- Thread (36)
-
Thread
:: Backtrace :: Location (48) - Time (12)
- TracePoint (48)
- Tracer (84)
- TrueClass (60)
-
URI
:: Generic (24) - UnboundMethod (48)
-
WEBrick
:: HTTPResponse (12) -
WEBrick
:: HTTPServlet :: AbstractServlet (72) -
WEBrick
:: HTTPServlet :: FileHandler (12) -
WEBrick
:: HTTPUtils :: FormData (96) -
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (48) -
WIN32OLE
_ TYPELIB (36) -
Win32
:: Registry (108) -
Win32
:: Registry :: PredefinedKey (12)
モジュール
-
ERB
:: DefMethod (12) - Enumerable (168)
- Exception2MessageMapper (54)
-
Fiddle
:: Importer (24) - Forwardable (48)
- Gem (36)
-
Gem
:: SSL (24) -
IRB
:: ExtendCommandBundle (12) - JSON (36)
-
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (208)
- Marshal (24)
-
Mutex
_ m (24) - ObjectSpace (144)
-
OpenSSL
:: ASN1 (552) - Psych (19)
- RDoc (24)
-
REXML
:: StreamListener (12) -
Rake
:: TaskManager (24) -
Socket
:: Constants (36) - TSort (93)
- Timeout (21)
-
WEBrick
:: HTTPAuth :: Authenticator (12) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (12) -
WEBrick
:: HTTPAuth :: UserDB (12) -
WEBrick
:: HTTPStatus (12) -
Win32
:: Registry :: Constants (108)
キーワード
- ! (12)
- != (12)
-
$ ERROR _ INFO (12) -
$ ERROR _ POSITION (12) -
$ FILENAME (12) - & (36)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - < (12)
- << (14)
- <=> (12)
- == (24)
- === (20)
- =~ (7)
- >> (14)
- APOP (12)
- ARGF (24)
-
ARGF
. class (12) - ASN1 (12)
- AnonClass (12)
- Application (1)
- AuthException (24)
- BMPString (24)
- BasicObject (12)
- BitString (24)
- Boolean (24)
-
CLASS
_ MODIFIERS (12) -
CLASS
_ OF (12) -
CODE
_ CLASS _ TO _ OBJ (12) - Class (24)
- ClassModule (12)
- Closure (12)
- ConditionVariable (12)
- DEFAULT (2)
-
DIGEST
_ SHA1 (12) - DelegateClass (12)
-
EVENT
_ SYMBOL (12) - Enumerated (24)
- Error (12)
- FALSE (8)
- Fail (12)
- FalseClass (36)
- Filter (12)
- Forwardable (12)
- GeneralString (24)
- GeneralizedTime (24)
- GraphicString (24)
-
HKEY
_ CLASSES _ ROOT (24) -
HKEY
_ CURRENT _ CONFIG (24) -
HKEY
_ CURRENT _ USER (24) -
HKEY
_ DYN _ DATA (24) -
HKEY
_ LOCAL _ MACHINE (24) -
HKEY
_ PERFORMANCE _ DATA (24) -
HKEY
_ PERFORMANCE _ NLSTEXT (24) -
HKEY
_ PERFORMANCE _ TEXT (24) -
HKEY
_ USERS (24) - IA5String (24)
- IN (12)
-
IPPROTO
_ TP (24) -
IPV6
_ RECVTCLASS (24) -
IPV6
_ TCLASS (24) - ISO64String (24)
- Integer (24)
-
KNOWN
_ CLASSES (12) - Location (12)
- MD5 (12)
- Markup (12)
- Marshal フォーマット (12)
- Method (12)
- MonitorMixin (12)
-
Mutex
_ m (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NIL (8)
- NilClass (36)
- NormalClass (12)
- Null (24)
- Numeric (12)
- NumericString (24)
- ObjectId (24)
- Observable (12)
- OctetString (24)
- Options (12)
-
PASSTHROUGH
_ EXCEPTIONS (1) -
PKEY
_ RSA (12) - Parser (12)
- Passwd (12)
- PrintableString (24)
- Proxy (12)
- RCLASS (12)
- RMODULE (12)
- Raise (12)
- ReFe (12)
- Requirement (12)
- Ruby プログラムの実行 (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- SHA1 (12)
- SHA256 (12)
- Sequence (24)
- Set (24)
- SingleClass (12)
- SingleForwardable (12)
- Singleton (12)
- String (12)
- T61String (24)
- TRUE (8)
- TYPES (12)
- TrueClass (36)
- UTCTime (24)
- UTF8String (24)
- UnboundMethod (12)
- UniversalString (24)
- VideotexString (24)
- Visitors (12)
- [] (72)
- ^ (36)
-
_ _ send _ _ (24) -
_ dump (12) -
_ load (12) -
absolute
_ path (12) - accept (24)
-
add
_ authenticator (12) -
add
_ class (12) -
add
_ class _ or _ module (24) -
add
_ filter (24) -
add
_ module (12) -
add
_ special (12) -
add
_ trace _ func (12) -
all
_ classes _ and _ modules (12) - allocate (12)
- ancestors (12)
-
append
_ features (24) - argv (12)
- arity (24)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) -
auth
_ type (12) - autoload (24)
- autoload? (12)
- backtrace (12)
-
base
_ label (12) - bind (12)
- binmode (12)
- binmode? (12)
-
boot
_ defclass (12) - bytes (14)
- call (24)
-
callee
_ id (12) - cgi (12)
-
cgi
/ session (12) - chars (14)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ name (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - classes (12)
- classify (12)
- classname (12)
- clone (36)
- close (12)
- closed? (12)
- codepoints (14)
- component (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ missing (12) -
const
_ source _ location (12) - constants (24)
-
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) - coverage (8)
-
create
_ id (12) -
create
_ id= (12) - debug (12)
- decode (12)
-
def
_ builtin _ commands (6) -
def
_ class (12) -
def
_ delegator (12) -
def
_ erb _ method (12) -
def
_ exception (12) -
def
_ extend _ command (12) -
def
_ instance _ delegator (12) -
def
_ module (12) -
default
_ event _ sources (12) -
default
_ port (12) - define (6)
-
define
_ aliases (12) -
define
_ finalizer (24) -
define
_ method (24) -
define
_ singleton _ method (24) -
define
_ task (12) -
defined
_ class (12) - delegate (12)
- display (12)
-
do
_ DELETE (12) -
do
_ GET (12) -
do
_ HEAD (12) -
do
_ OPTIONS (12) -
do
_ POST (12) -
do
_ PUT (12) - drb (12)
-
drb
/ extservm (12) -
drb
/ gw (12) - dump (24)
- dup (24)
- e2mmap (6)
- each (48)
-
each
_ byte (24) -
each
_ char (24) -
each
_ classmodule (12) -
each
_ codepoint (24) -
each
_ data (12) -
each
_ entry (24) -
each
_ line (48) -
each
_ object (48) -
each
_ resource (12) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - eager (6)
- entitydecl (12)
- eof (12)
- eof? (12)
- error (12)
- error? (12)
- extend (12)
-
external
_ encoding (12) - fail (42)
- file (12)
- filename (24)
- filename= (12)
- fileno (12)
-
find
_ class _ named (12) -
find
_ class _ path (12) -
find
_ local _ symbol (12) -
fixed
_ encoding? (12) -
for
_ fd (12) -
from
_ state (12) - getbyte (12)
- getc (12)
- getresource (12)
- getresources (12)
- gets (36)
-
global
_ variables (12) - handler= (12)
-
http
_ version (12) - include (12)
- include? (12)
-
include
_ class _ new (12) - included (12)
- inherited (12)
- initialize (12)
-
initialize
_ classes _ and _ modules (12) -
initialize
_ copy (12) -
inplace
_ mode (12) -
inplace
_ mode= (12) -
ins
_ methods _ i (12) -
ins
_ methods _ priv _ i (12) -
ins
_ methods _ prot _ i (12) - inspect (84)
-
instance
_ delegate (12) -
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variables (12) - intern (12)
-
internal
_ encoding (12) - irb (12)
-
irb
/ completion (12) -
is
_ a? (12) -
json
/ add / core (12) -
json
_ creatable? (12) -
kind
_ of? (12) - lambda? (12)
- lineno (12)
- lineno= (12)
- lines (42)
- list (12)
-
local
_ variables (12) -
marshal
_ dump (12) -
marshal
_ load (12) - max (48)
- merge (24)
-
method
_ added (12) -
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) -
method
_ removed (12) -
method
_ undefined (12) - methods (12)
- min (48)
-
minitest
/ unit (1) -
module
_ eval (24) -
module
_ exec (12) - name (36)
- name= (12)
- nesting (12)
- new (792)
- nil? (12)
-
num
_ classes (12) -
num
_ classes= (12) -
object
_ group (12) -
ole
_ classes (24) -
ole
_ type (12) -
ole
_ types (12) - on (168)
- open (144)
-
original
_ name (24) - owner (24)
- parameters (12)
- parse (12)
-
parse
_ files _ matching (12) - path (24)
- pathmap (12)
- pos (12)
- pos= (12)
- pp (12)
- prepend (12)
-
prepend
_ features (12) - prepended (12)
-
pretty
_ print (12) -
pretty
_ print _ cycle (12) - print (12)
- printf (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
proxy
_ class? (12) -
public
_ class _ method (24) -
public
_ constant (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putc (12)
- puts (12)
- raise (36)
-
rake
/ classic _ namespace (12) -
rake
_ extension (12) - rationalize (24)
-
rb
_ catch (12) -
rb
_ class2name (12) -
rb
_ class _ allocate _ instance (12) -
rb
_ class _ boot (12) -
rb
_ class _ inherited (12) -
rb
_ class _ initialize (12) -
rb
_ class _ instance _ methods (12) -
rb
_ class _ new (12) -
rb
_ class _ new _ instance (12) -
rb
_ class _ path (12) -
rb
_ class _ private _ instance _ methods (12) -
rb
_ class _ protected _ instance _ methods (12) -
rb
_ class _ real (12) -
rb
_ class _ s _ new (12) -
rb
_ class _ superclass (12) -
rb
_ clear _ cache _ by _ class (12) -
rb
_ define _ class (12) -
rb
_ define _ class _ id (12) -
rb
_ define _ class _ under (12) -
rb
_ define _ class _ variable (12) -
rb
_ frozen _ class _ p (12) -
rb
_ is _ class _ id (12) -
rb
_ mod _ class _ variables (12) -
rb
_ name _ class (12) -
rb
_ obj _ class (12) -
rb
_ path2class (12) -
rb
_ set _ class _ path (12) -
rb
_ singleton _ class (12) -
rb
_ singleton _ class _ attached (12) -
rb
_ singleton _ class _ clone (12) -
rb
_ singleton _ class _ new (12) - rdoc (12)
-
rdoc
/ anon _ class (12) -
rdoc
/ class _ module (12) -
rdoc
/ generator (12) -
rdoc
/ generator / json _ index (12) -
rdoc
/ known _ classes (12) -
rdoc
/ normal _ class (12) -
rdoc
/ parser (12) -
rdoc
/ parser / c (12) -
rdoc
/ single _ class (12) -
reachable
_ objects _ from (12) - read (24)
-
read
_ nonblock (12) - readbyte (24)
- readchar (12)
- readline (36)
- readlines (48)
- readpartial (12)
- receiver (22)
- refine (12)
- reject (24)
-
remove
_ class _ variable (12) -
remove
_ classes _ and _ modules (12) -
remove
_ const (12) -
remove
_ handler (12) -
remove
_ instance _ variable (12) -
remove
_ method (12) - replace (12)
- request (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) - rewind (12)
-
rexml
/ parsers / sax2parser (12) -
rexml
/ parsers / streamparser (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
rubygems
/ command _ manager (12) -
safe
_ load (19) - seek (12)
- send (24)
-
set
_ encoding (36) -
set
_ get _ line _ procs (24) -
set
_ trace _ func (24) -
singleton
_ class (12) -
singleton
_ class? (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - skip (12)
-
socket
_ type (12) -
sort
_ by (24) -
source
_ location (12) - stat (12)
-
strongly
_ connected _ components (12) - struct (12)
- subclasses (4)
-
super
_ method (11) - superclass (24)
-
tag
_ class (12) -
tag
_ class= (12) - tell (12)
-
test
/ unit (1) - timeout (37)
-
to
_ a (72) -
to
_ ary (36) -
to
_ bn (12) -
to
_ c (12) -
to
_ d (7) -
to
_ f (12) -
to
_ h (31) -
to
_ hash (12) -
to
_ i (24) -
to
_ int (12) -
to
_ io (12) -
to
_ json (168) -
to
_ json _ raw _ object (12) -
to
_ proc (24) -
to
_ r (12) -
to
_ regexp (12) -
to
_ s (108) -
to
_ set (24) -
to
_ str (12) -
to
_ write _ io (12) -
trace
_ object _ allocations (12) - tracer (12)
- traverse (12)
- tsort (24)
-
tsort
_ each (23) - uclass (12)
- uclass= (12)
- unbind (12)
-
undef
_ method (12) -
undefine
_ finalizer (12) - union (12)
- value (24)
-
webrick
/ cgi (12) - write (12)
- yaml (12)
-
yaml
_ tag (12) - | (36)
- オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (12)
- クラス (12)
- クラス/メソッドの定義 (12)
- パターンマッチ (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- リテラル (12)
- 制御構造 (12)
- 変数と定数 (12)
- 字句構造 (12)
- 正規表現 (12)
- 演算子式 (12)
検索結果
先頭5件
-
static VALUE classname(VALUE klass) (26100.0)
-
-
Object
# class -> Class (18256.0) -
レシーバのクラスを返します。
...レシーバのクラスを返します。
//emlist[][ruby]{
p "ruby".class #=> String
p 100.class #=> Integer
p ARGV.class #=> Array
p self.class #=> Object
p Class.class #=> Class
p Kernel.class #=> Module
//}
@see Class#superclass,Object#kind_of?,Object#instance_of?... -
Win32
:: Registry :: PredefinedKey # class (18101.0) -
@todo
@todo -
Class
# subclasses -> [Class] (15231.0) -
自身が直接のスーパークラスになっている(特異クラスを除く)クラスの配列を返します。 返り値の配列の順序は未定義です。
...を除く)クラスの配列を返します。
返り値の配列の順序は未定義です。
//emlist[例][ruby]{
class A; end
class B < A; end
class C < B; end
class D < A; end
A.subclasses # => [D, B]
B.subclasses # => [C]
C.subclasses # => []
//}
@see Class#superclass... -
Class
# superclass -> Class | nil (15219.0) -
自身のスーパークラスを返します。
...{
File.superclass #=> IO
IO.superclass #=> Object
class Foo; end
class Bar < Foo; end
Bar.superclass #=> Foo
Object.superclass #=> BasicObject
//}
ただし BasicObject.superclass は nil を返します。
//emlist[例][ruby]{
BasicObject.superclass #=> nil......//}
@see Class#subclasses... -
static VALUE rb
_ class _ superclass(VALUE klass) (12200.0) -
-
Class
. new(superclass = Object) -> Class (9232.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
...ていない superclass のサブクラスを生成します。
名前のないクラスは、最初に名前を求める際に代入されている定数名を検
索し、見つかった定数名をクラス名とします。
//emlist[例][ruby]{
p foo = Class.new # => #<Class:0x401b90f8>
p fo...... Class.new(superclass)
klass.module_eval {|m|
# ...
}
klass
//}
この場合も生成したクラスを返します。
ブロックの実行は Class#initialize が行います。
@param superclass 生成するクラスのスーパークラスを指定します。
//emlist[例][ruby]{
k = Class... -
Class
. new(superclass = Object) {|klass| . . . } -> Class (9232.0) -
新しく名前の付いていない superclass のサブクラスを生成します。
...ていない superclass のサブクラスを生成します。
名前のないクラスは、最初に名前を求める際に代入されている定数名を検
索し、見つかった定数名をクラス名とします。
//emlist[例][ruby]{
p foo = Class.new # => #<Class:0x401b90f8>
p fo...... Class.new(superclass)
klass.module_eval {|m|
# ...
}
klass
//}
この場合も生成したクラスを返します。
ブロックの実行は Class#initialize が行います。
@param superclass 生成するクラスのスーパークラスを指定します。
//emlist[例][ruby]{
k = Class... -
Class
# inherited(subclass) -> () (9136.0) -
クラスのサブクラスが定義された時、新しく生成されたサブクラスを引数 にインタプリタから呼び出されます。このメソッドが呼ばれるタイミングは クラス定義文の実行直前です。
...@param subclass プログラム内で新たに定義された自身のサブクラスです。
//emlist[例][ruby]{
class Foo
def Foo.inherited(subclass)
puts "class \"#{self}\" was inherited by \"#{subclass}\""
end
end
class Bar < Foo
puts "executing class body"
end
# => class "Foo" was......inherited by "Bar"
# executing class body
//}...