種類
ライブラリ
- English (22)
- ビルトイン (2630)
-
bigdecimal
/ util (6) - csv (77)
- digest (11)
- e2mmap (54)
- erb (22)
- etc (11)
- fiddle (11)
-
fiddle
/ import (22) - forwardable (44)
- getoptlong (22)
-
irb
/ extend-command (11) - json (143)
-
json
/ add / bigdecimal (11) -
json
/ add / complex (11) -
json
/ add / date (11) -
json
/ add / date _ time (11) -
json
/ add / exception (11) -
json
/ add / range (11) -
json
/ add / rational (11) -
json
/ add / regexp (11) -
json
/ add / struct (11) -
json
/ add / time (11) - logger (1)
-
minitest
/ unit (1) - monitor (11)
-
mutex
_ m (22) -
net
/ http (11) -
net
/ imap (11) -
net
/ pop (11) - objspace (44)
- openssl (880)
- optparse (176)
- pp (22)
- psych (28)
- rake (44)
- rdoc (11)
-
rdoc
/ context (77) -
rdoc
/ generator / json _ index (11) -
rdoc
/ known _ classes (11) -
rdoc
/ markup (11) -
rdoc
/ parser (11) -
rdoc
/ single _ class (11) -
rdoc
/ stats (11) -
rdoc
/ top _ level (44) - resolv (11)
-
rexml
/ document (22) -
rexml
/ streamlistener (11) -
ripper
/ filter (11) -
rubygems
/ digest / digest _ adapter (11) -
rubygems
/ ext / builder (11) -
rubygems
/ gem _ openssl (11) -
rubygems
/ remote _ fetcher (11) -
rubygems
/ version (11) - set (11)
-
shell
/ command-processor (6) - singleton (11)
- socket (66)
- thread (2)
- timeout (52)
- tracer (55)
- tsort (43)
- uri (22)
-
webrick
/ httpauth / authenticator (22) -
webrick
/ httpauth / userdb (11) -
webrick
/ httpresponse (11) -
webrick
/ httpservlet / abstract (66) -
webrick
/ httpservlet / filehandler (11) -
webrick
/ httpstatus (11) -
webrick
/ httputils (88) -
win32
/ registry (209) - win32ole (88)
クラス
-
ARGF
. class (705) - Array (11)
- BasicObject (132)
- BigDecimal (11)
- CSV (77)
- Class (22)
- Complex (11)
- Data (4)
- Date (11)
- DateTime (11)
- Dir (66)
- ERB (11)
-
Enumerator
:: Lazy (11) -
Etc
:: Passwd (11) - Exception (22)
- FalseClass (22)
- File (55)
-
Gem
:: DigestAdapter (11) -
Gem
:: Ext :: Builder (11) -
Gem
:: RemoteFetcher (11) -
Gem
:: Version (11) - GetoptLong (22)
- IO (55)
- Integer (11)
-
JSON
:: Parser (11) -
JSON
:: State (22) - Method (87)
-
MiniTest
:: Unit :: TestCase (1) - Module (447)
- NameError (9)
-
Net
:: HTTPResponse (11) -
Net
:: IMAP (11) -
Net
:: POP3 (11) - NilClass (155)
- Object (304)
-
OpenSSL
:: ASN1 :: BMPString (22) -
OpenSSL
:: ASN1 :: BitString (22) -
OpenSSL
:: ASN1 :: Boolean (11) -
OpenSSL
:: ASN1 :: Enumerated (11) -
OpenSSL
:: ASN1 :: GeneralString (22) -
OpenSSL
:: ASN1 :: GeneralizedTime (22) -
OpenSSL
:: ASN1 :: GraphicString (22) -
OpenSSL
:: ASN1 :: IA5String (22) -
OpenSSL
:: ASN1 :: ISO64String (22) -
OpenSSL
:: ASN1 :: Integer (22) -
OpenSSL
:: ASN1 :: Null (11) -
OpenSSL
:: ASN1 :: NumericString (22) -
OpenSSL
:: ASN1 :: ObjectId (22) -
OpenSSL
:: ASN1 :: OctetString (22) -
OpenSSL
:: ASN1 :: PrintableString (22) -
OpenSSL
:: ASN1 :: Sequence (11) -
OpenSSL
:: ASN1 :: Set (11) -
OpenSSL
:: ASN1 :: T61String (22) -
OpenSSL
:: ASN1 :: UTCTime (22) -
OpenSSL
:: ASN1 :: UTF8String (22) -
OpenSSL
:: ASN1 :: UniversalString (22) -
OpenSSL
:: ASN1 :: VideotexString (22) - OptionParser (176)
-
RDoc
:: Context (77) -
RDoc
:: Generator :: JsonIndex (11) -
RDoc
:: Markup (11) -
RDoc
:: Parser (11) -
RDoc
:: Stats (11) -
RDoc
:: TopLevel (44) -
REXML
:: CData (22) - Range (22)
- Rational (11)
- Regexp (22)
-
RubyVM
:: InstructionSequence (11) - Set (11)
-
Shell
:: CommandProcessor (6) - Socket (33)
- String (11)
- Struct (25)
- Thread (22)
-
Thread
:: Backtrace :: Location (44) - Time (11)
- TracePoint (44)
- Tracer (55)
- TrueClass (22)
-
URI
:: Generic (22) - UnboundMethod (33)
-
WEBrick
:: HTTPResponse (11) -
WEBrick
:: HTTPServlet :: AbstractServlet (66) -
WEBrick
:: HTTPServlet :: FileHandler (11) -
WEBrick
:: HTTPUtils :: FormData (88) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ TYPE (44) -
WIN32OLE
_ TYPELIB (33) -
Win32
:: Registry (99) -
Win32
:: Registry :: PredefinedKey (11)
モジュール
-
ERB
:: DefMethod (11) - Enumerable (88)
- Exception2MessageMapper (54)
-
Fiddle
:: Importer (22) - Forwardable (33)
-
Gem
:: SSL (11) -
IRB
:: ExtendCommandBundle (11) - JSON (33)
-
JSON
:: Generator :: GeneratorMethods :: FalseClass (11) -
JSON
:: Generator :: GeneratorMethods :: NilClass (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (11) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11) - Kernel (176)
- Marshal (22)
-
Mutex
_ m (22) - ObjectSpace (99)
-
OpenSSL
:: ASN1 (440) - Psych (17)
- RDoc (22)
-
REXML
:: StreamListener (11) -
Rake
:: TaskManager (22) -
Socket
:: Constants (33) - TSort (43)
- Timeout (19)
-
WEBrick
:: HTTPAuth :: Authenticator (11) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (11) -
WEBrick
:: HTTPAuth :: UserDB (11) -
WEBrick
:: HTTPStatus (11) -
Win32
:: Registry :: Constants (99)
キーワード
- ! (11)
- != (11)
-
$ ERROR _ INFO (11) -
$ ERROR _ POSITION (11) -
$ FILENAME (11) - & (11)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - < (11)
- <=> (11)
- == (22)
- === (11)
- =~ (6)
- APOP (11)
- ARGF (11)
- Application (1)
- AuthException (22)
- BMPString (22)
- BasicObject (11)
- BitString (22)
- Boolean (11)
-
CLASS
_ MODIFIERS (11) - Class (11)
- Closure (11)
- ConditionVariable (11)
-
DIGEST
_ SHA1 (11) - Enumerated (11)
- Error (11)
- Fail (12)
- Filter (11)
- GeneralString (22)
- GeneralizedTime (22)
- GraphicString (22)
-
HKEY
_ CLASSES _ ROOT (22) -
HKEY
_ CURRENT _ CONFIG (22) -
HKEY
_ CURRENT _ USER (22) -
HKEY
_ DYN _ DATA (22) -
HKEY
_ LOCAL _ MACHINE (22) -
HKEY
_ PERFORMANCE _ DATA (22) -
HKEY
_ PERFORMANCE _ NLSTEXT (22) -
HKEY
_ PERFORMANCE _ TEXT (22) -
HKEY
_ USERS (22) - IA5String (22)
- IN (11)
-
IPPROTO
_ TP (22) -
IPV6
_ RECVTCLASS (22) -
IPV6
_ TCLASS (22) - ISO64String (22)
- Integer (22)
-
KNOWN
_ CLASSES (11) - Location (11)
- Marshal フォーマット (11)
- MonitorMixin (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - NIL (7)
- NilClass (33)
- Null (11)
- Numeric (11)
- NumericString (22)
- ObjectId (22)
- OctetString (22)
- Options (11)
-
PASSTHROUGH
_ EXCEPTIONS (1) - PrintableString (22)
- Raise (12)
- ReFe (11)
- Requirement (11)
- Ruby用語集 (11)
- Sequence (11)
- Set (11)
- SingleClass (11)
- SingleForwardable (11)
- Singleton (11)
- String (11)
- T61String (22)
- TYPES (11)
- UTCTime (22)
- UTF8String (22)
- UniversalString (22)
- VideotexString (22)
- Visitors (11)
- [] (44)
- ^ (11)
-
_ _ send _ _ (22) -
_ dump (11) -
absolute
_ path (11) - accept (22)
-
add
_ authenticator (11) -
add
_ class (11) -
add
_ class _ or _ module (22) -
add
_ filter (22) -
add
_ module (11) -
add
_ special (11) -
all
_ classes _ and _ modules (11) -
append
_ features (11) - arity (22)
-
attr
_ writer (4) -
auth
_ type (11) - autoload (22)
- autoload? (11)
- backtrace (11)
-
base
_ label (11) - bind (11)
- binmode (11)
- binmode? (11)
-
boot
_ defclass (11) -
callee
_ id (11) - cgi (11)
-
cgi
/ session (11) -
class
_ eval (11) -
class
_ name (11) -
class
_ variable _ defined? (11) -
class
_ variable _ get (11) -
class
_ variable _ set (11) -
class
_ variables (11) - classes (11)
- classify (11)
- classname (11)
- codepoints (14)
- component (11)
-
const
_ defined? (11) -
const
_ get (11) -
const
_ missing (11) -
const
_ source _ location (5) - constants (11)
-
count
_ objects _ size (11) -
count
_ tdata _ objects (11) -
create
_ id (11) -
create
_ id= (11) - debug (11)
-
def
_ builtin _ commands (6) -
def
_ delegator (11) -
def
_ erb _ method (11) -
def
_ exception (12) -
def
_ extend _ command (11) -
def
_ instance _ delegator (11) -
default
_ event _ sources (11) -
default
_ port (11) - define (4)
-
define
_ aliases (11) -
define
_ finalizer (22) -
define
_ method (22) -
define
_ singleton _ method (22) -
define
_ task (11) -
defined
_ class (11) - display (11)
-
do
_ DELETE (11) -
do
_ GET (11) -
do
_ HEAD (11) -
do
_ OPTIONS (11) -
do
_ POST (11) -
do
_ PUT (11) - dump (22)
- each (33)
-
each
_ char (22) -
each
_ classmodule (11) -
each
_ codepoint (22) -
each
_ data (11) -
each
_ line (44) -
each
_ object (22) -
each
_ strongly _ connected _ component (11) -
each
_ strongly _ connected _ component _ from (21) - entitydecl (11)
- error (11)
- error? (11)
-
external
_ encoding (11) - fail (39)
- file (11)
- filename (22)
- filename= (11)
- fileno (11)
-
find
_ class _ named (11) -
find
_ class _ path (11) -
find
_ local _ symbol (11) -
fixed
_ encoding? (11) -
for
_ fd (11) -
from
_ state (11) - getbyte (11)
- getc (11)
- gets (33)
-
global
_ variables (11) - handler= (11)
-
http
_ version (11) - include (11)
- include? (11)
-
include
_ class _ new (11) - included (11)
- inherited (11)
- initialize (11)
-
initialize
_ classes _ and _ modules (11) -
initialize
_ copy (11) -
inplace
_ mode (11) -
inplace
_ mode= (11) -
ins
_ methods _ i (11) -
ins
_ methods _ priv _ i (11) -
ins
_ methods _ prot _ i (11) - inspect (77)
-
instance
_ delegate (11) -
instance
_ eval (22) -
instance
_ exec (11) -
instance
_ method (11) -
instance
_ methods (11) -
instance
_ of? (11) -
instance
_ variable _ defined? (11) -
instance
_ variable _ get (11) -
instance
_ variables (11) - intern (11)
-
internal
_ encoding (11) - irb (11)
-
irb
/ completion (11) -
is
_ a? (11) -
kind
_ of? (11) - lineno (11)
- lineno= (11)
- lines (42)
- list (11)
-
local
_ variables (11) - max (22)
-
method
_ defined? (11) -
method
_ id (11) -
method
_ missing (11) -
method
_ undefined (11) - methods (11)
- min (44)
-
minitest
/ unit (1) -
module
_ eval (11) - name (22)
- name= (11)
- nesting (11)
- new (608)
- nil? (11)
-
num
_ classes (11) -
ole
_ classes (22) -
ole
_ type (11) -
ole
_ types (11) - on (143)
- open (132)
-
original
_ name (22) -
parse
_ files _ matching (11) - path (22)
- pathmap (11)
- pos (11)
-
pretty
_ print (11) -
pretty
_ print _ cycle (11) - print (11)
- printf (11)
- private (23)
-
private
_ class _ method (15) -
private
_ constant (11) -
private
_ method _ defined? (11) -
protected
_ method _ defined? (11) -
public
_ class _ method (15) -
public
_ constant (11) -
public
_ method (11) -
public
_ method _ defined? (11) - puts (11)
- raise (33)
-
rake
/ classic _ namespace (11) -
rake
_ extension (11) - rationalize (22)
-
rb
_ class _ allocate _ instance (11) -
rb
_ class _ inherited (11) -
rb
_ class _ initialize (11) -
rb
_ class _ instance _ methods (11) -
rb
_ class _ new _ instance (11) -
rb
_ class _ private _ instance _ methods (11) -
rb
_ class _ protected _ instance _ methods (11) -
rb
_ class _ s _ new (11) -
rb
_ class _ superclass (11) -
rb
_ clear _ cache _ by _ class (11) -
rb
_ define _ class (11) -
rb
_ define _ class _ id (11) -
rb
_ define _ class _ under (11) -
rb
_ define _ class _ variable (11) -
rb
_ frozen _ class _ p (11) -
rb
_ is _ class _ id (11) -
rb
_ mod _ class _ variables (11) -
rb
_ name _ class (11) -
rb
_ set _ class _ path (11) -
rb
_ singleton _ class (11) -
rb
_ singleton _ class _ attached (11) -
rb
_ singleton _ class _ clone (11) -
rb
_ singleton _ class _ new (11) - rdoc (11)
-
rdoc
/ generator / json _ index (11) -
rdoc
/ single _ class (11) -
reachable
_ objects _ from (11) - read (22)
-
read
_ nonblock (11) - readbyte (22)
- readchar (11)
- readline (33)
- readlines (44)
- readpartial (11)
- receiver (20)
- refine (11)
- reject (22)
-
remove
_ class _ variable (11) -
remove
_ handler (11) -
remove
_ instance _ variable (11) - request (11)
-
respond
_ to? (11) -
respond
_ to _ missing? (11) - rewind (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
safe
_ load (17) - seek (11)
-
set
_ encoding (33) -
set
_ get _ line _ procs (22) -
set
_ trace _ func (11) -
singleton
_ class (11) -
singleton
_ class? (11) -
singleton
_ method (11) -
singleton
_ method _ added (11) -
singleton
_ method _ removed (11) -
singleton
_ method _ undefined (11) -
singleton
_ methods (11) - skip (11)
-
sort
_ by (22) -
source
_ location (11) - stat (11)
- struct (11)
-
super
_ method (10) - superclass (22)
- tell (11)
-
test
/ unit (1) - timeout (41)
-
to
_ a (55) -
to
_ ary (11) -
to
_ bn (11) -
to
_ c (11) -
to
_ d (6) -
to
_ f (11) -
to
_ h (11) -
to
_ i (22) -
to
_ int (11) -
to
_ io (11) -
to
_ json (154) -
to
_ json _ raw _ object (11) -
to
_ r (11) -
to
_ s (99) -
to
_ str (11) -
to
_ write _ io (11) -
trace
_ object _ allocations (11) - tracer (11)
- traverse (11)
- tsort (11)
-
tsort
_ each (11) - uclass (11)
- unbind (11)
-
undefine
_ finalizer (11) - union (11)
- value (22)
-
webrick
/ cgi (11) - write (11)
- | (11)
- オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (11)
- メソッド呼び出し(super・ブロック付き・yield) (11)
- リテラル (11)
- 制御構造 (11)
- 変数と定数 (11)
- 字句構造 (11)
- 正規表現 (11)
- 演算子式 (11)
検索結果
先頭5件
-
static VALUE include
_ class _ new(VALUE module , VALUE super) (32200.0) -
super をスーパークラスとして モジュールの「化身」クラスを作成し返します。
super をスーパークラスとして
モジュールの「化身」クラスを作成し返します。 -
static int ins
_ methods _ i(ID key , NODE *body , VALUE ary) (26116.0) -
rb_class_instance_methods() のイテレータブロック (通常版)。
...rb_class_instance_methods() のイテレータブロック (通常版)。... -
static int ins
_ methods _ priv _ i(ID key , NODE *body , VALUE ary) (26116.0) -
rb_class_instance_methods() のイテレータブロック (private メソッド版)。
...rb_class_instance_methods() のイテレータブロック
(private メソッド版)。... -
static int ins
_ methods _ prot _ i(ID key , NODE *body , VALUE ary) (26116.0) -
rb_class_instance_methods() のイテレータブロック (protected メソッド版)。
...rb_class_instance_methods() のイテレータブロック
(protected メソッド版)。... -
irb (26096.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def foo
irb(main):004:2> print 1
irb(main):005:2> end
irb(main):006:1>......end
:foo
irb(main):007:0>
また irb コマンドは readline ライブラリにも対応しています。
readline ライブラリがインストールされている時には
自動的にコマンドライン編集や履歴の機能が使えるようになります。
=== irb のコマン... -
irb
/ completion (26006.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Objec......lic_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect foo.send
foo.__send__ foo.instance_eval foo.singleton_methods
foo.class foo.instance_of? foo.taint
foo.clone foo.i... -
Win32
:: Registry :: PredefinedKey # class (24101.0) -
@todo
@todo -
オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (23006.0)
-
オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル * Ruby オフィシャルサイト https://www.ruby-lang.org/ja/ * version 3.3 対応リファレンス * 原著:まつもとゆきひろ * 最新版URL: https://www.ruby-lang.org/ja/documentation/
...ntation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っています。
標準添付ライブラリのリファレンスは一部未完成です。
それ以外のドキュメントについては、まだまだ書き直しが必要です。
=== 目次
* spec/intro......様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
* spec/safelevel
Ruby の文法:
* spec/lexical
* spec/program
* spec/variables
* spec/literal
* spec/operator
* spec/control
* spec/call
* s......f
その他:
* spec/m17n
* spec/regexp
* spec/lambda_proc
==== 組み込みライブラリ
* _builtin
==== 標準添付ライブラリ
* /
==== C API
* /
==== その他
* news/index
* pack_template
* print_format
* glossary
* symref
* marshal_format
* license
* help......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.3 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って....../intro
* spec/commands
* spec/rubycmd
* spec/envvars
==== Ruby 言語仕様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
* spec/safelevel
Ruby の文法:
* spec/lexical
* spec/program
* spec/varia......ec/literal
* spec/operator
* spec/control
* spec/call
* spec/def
その他:
* spec/m17n
* spec/regexp
* spec/lambda_proc
==== 組み込みライブラリ
* _builtin
==== 標準添付ライブラリ
* /
==== C API
* /
==== その他
* news/index
* pack_template
* print_......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.4 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.5 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.6 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.7 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.0 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.1 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.2 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って......c/intro
* spec/commands
* spec/rubycmd
* spec/envvars
==== Ruby 言語仕様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
Ruby の文法:
* spec/lexical
* spec/program
* spec/variables
* spec/lite......ニュアル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.3 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃って... -
TracePoint
# defined _ class -> Class | module (15350.0) -
メソッドを定義したクラスかモジュールを返します。
...す。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]......{
module M; def foo; end; end
class C; include M; end;
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}
[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、Kernel.#set_trace_fun......スではなく元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#set_trace_func と TracePoint の上記の差分に注意して
ください。
@s... -
Class
# superclass -> Class | nil (15319.0) -
自身のスーパークラスを返します。
...//emlist[例][ruby]{
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...