5021件ヒット
[1-100件を表示]
(0.068秒)
クラス
-
ARGF
. class (192) - Array (806)
- BasicObject (168)
- Binding (44)
- Class (48)
- Complex (12)
- Data (12)
- Enumerator (156)
-
Enumerator
:: Chain (21) -
Enumerator
:: Lazy (60) -
Enumerator
:: Yielder (24) - Fiber (34)
- FrozenError (6)
- Hash (277)
- IO (48)
- KeyError (16)
- LocalJumpError (12)
- MatchData (12)
- Method (92)
- Module (474)
- Mutex (2)
- NameError (34)
- NoMethodError (12)
- Numeric (12)
- Object (861)
-
ObjectSpace
:: WeakMap (12) - Proc (12)
- Random (36)
- Range (200)
- Rational (12)
- Regexp (36)
-
RubyVM
:: InstructionSequence (12) - Set (9)
- StopIteration (12)
- String (81)
- Struct (114)
- Symbol (4)
- Thread (44)
-
Thread
:: Mutex (10) -
Thread
:: Queue (30) -
Thread
:: SizedQueue (30) - Time (12)
- TracePoint (79)
- UnboundMethod (24)
- UncaughtThrowError (22)
モジュール
- Comparable (15)
- Enumerable (780)
キーワード
- ! (12)
- != (12)
- !~ (12)
- % (12)
- & (12)
- - (12)
- < (12)
- << (24)
- <= (12)
- <=> (24)
- == (54)
- === (56)
- =~ (9)
- >= (12)
- [] (96)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (12) -
_ load (12) - allocate (12)
- ancestors (12)
- args (12)
- argv (12)
- at (12)
- begin (12)
-
bind
_ call (12) - bsearch (48)
- call (24)
- clamp (27)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - clone (27)
- collect (48)
-
compare
_ by _ identity (12) -
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - constants (12)
- cycle (24)
- deconstruct (9)
- default (24)
-
define
_ singleton _ method (24) - delete (48)
-
delete
_ at (12) -
deprecate
_ constant (12) - deq (20)
- detect (24)
- difference (7)
- dig (30)
- disable (24)
- display (12)
- dup (27)
- each (110)
-
each
_ byte (24) -
each
_ char (24) -
each
_ line (48) -
each
_ with _ object (24) - enable (24)
- end (12)
- entries (12)
-
enum
_ for (48) - eql? (51)
- equal? (36)
- eval (24)
-
exit
_ value (12) - extend (12)
-
extend
_ object (12) - extended (12)
- feed (12)
- fetch (80)
-
fetch
_ values (20) - fill (72)
- filter (42)
-
filter
_ map (12) - find (24)
-
find
_ all (24) - first (72)
- force (12)
- freeze (24)
- frozen? (12)
- getbyte (12)
- getc (12)
- grep (24)
-
grep
_ v (24) - hash (39)
- include (12)
- index (7)
- initialize (12)
-
initialize
_ clone (12) -
initialize
_ copy (12) -
initialize
_ dup (12) - inject (36)
- inspect (24)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) - intersection (6)
- irb (9)
-
is
_ a? (12) - itself (12)
- key (20)
- keys (12)
-
kind
_ of? (12) - last (48)
-
local
_ variable _ get (12) - map (48)
-
marshal
_ dump (12) -
marshal
_ load (12) - match (48)
- max (130)
-
max
_ by (48) - method (12)
-
method
_ missing (12) - methods (12)
- min (130)
-
min
_ by (48) - minmax (48)
-
minmax
_ by (24) -
module
_ eval (24) -
module
_ exec (12) - name (12)
- new (12)
- next (12)
-
next
_ values (12) - nil? (12)
-
object
_ id (12) - parameters (43)
- partition (24)
- peek (12)
-
peek
_ values (12) - pop (44)
-
private
_ constant (9) -
private
_ instance _ methods (12) -
private
_ methods (12) -
protected
_ instance _ methods (12) -
protected
_ methods (12) - public (48)
-
public
_ constant (9) -
public
_ instance _ method (12) -
public
_ instance _ methods (12) -
public
_ method (12) -
public
_ methods (12) -
public
_ send (24) - putc (24)
- raise (18)
- rand (36)
-
read
_ nonblock (12) - receiver (47)
- reduce (36)
- rehash (12)
- reject (48)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) - replace (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) - result (12)
- resume (12)
-
return
_ value (12) - rewind (7)
- sample (48)
- select (72)
- self (12)
- send (24)
- shift (56)
-
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - slice (36)
- slice! (36)
- sort (24)
-
sort
_ by (24) - store (12)
- string (12)
- sum (42)
- superclass (12)
- synchronize (12)
- tag (11)
- taint (9)
- tainted? (9)
- tally (10)
- tap (12)
- then (14)
-
thread
_ variable _ get (12) -
to
_ a (36) -
to
_ ary (12) -
to
_ enum (48) -
to
_ hash (24) -
to
_ int (12) -
to
_ io (12) -
to
_ proc (16) -
to
_ regexp (12) -
to
_ s (36) -
to
_ str (12) - transfer (4)
- trust (9)
- union (7)
- uniq (24)
- uniq! (24)
- unpack1 (9)
- untaint (9)
- untrust (9)
- untrusted? (9)
- value (23)
- values (24)
-
values
_ at (24) -
with
_ index (24) -
with
_ object (24) -
write
_ nonblock (12) - yield (12)
-
yield
_ self (16) - zip (48)
- | (12)
検索結果
先頭5件
-
Module
# >(other) -> bool | nil (18145.0) -
比較演算子。 self が other の先祖である場合、true を返します。 self が other の子孫か同一クラスである場合、false を返します。
...nded
prepend Awesome
end
Included.ancestors # => [Included, Awesome]
Awesome > Included # => true
Included > Awesome # => false
Prepended.ancestors # => [Awesome, Prepended]
Awesome > Prepended # => true
Prepended > Awesome # => false
Awesome > Awesome # => false
Awesome > Object # => nil
//}... -
Object
# object _ id -> Integer (15282.0) -
各オブジェクトに対して一意な整数を返します。あるオブジェクトに対し てどのような整数が割り当てられるかは不定です。
...られるかは不定です。
Rubyでは、(Garbage Collectされていない)アクティブなオブジェクト間で
重複しない整数(object_id)が各オブジェクトにひとつずつ割り当てられています。この
メソッドはその値を返します。
TrueClass, FalseCla...... object_id になります。
これは、Immutable ならば複数の場所から参照されても`破壊的操作'による問題が発生しないので、
同じ内容のインスタンスを複数生成しないという内部実装が理由です。
//emlist[][ruby]{
p "ruby".object_id #=>......60
p "ruby".object_id #=> 80
p [].object_id #=> 100
p [].object_id #=> 120
p :ruby.object_id #=> 710428
p :ruby.object_id #=> 710428
p 11.object_id #=> 23
p 11.object_id #=> 23
p true.object_id #=> 20
p true.object_id #=> 20
//}
@see Object#equal?,Symbol... -
Object
# <=>(other) -> 0 | nil (15121.0) -
self === other である場合に 0 を返します。そうでない場合には nil を返します。
...self === other である場合に 0 を返します。そうでない場合には nil を返します。
//emlist[例][ruby]{
a = Object.new
b = Object.new
a <=> a # => 0
a <=> b # => nil
//}
@see Object#===... -
Object
# initialize _ copy(obj) -> object (9306.0) -
(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。
...elf のインスタンス変数や特異メソッドは変化しません。
デフォルトでは、Object#clone の内部で Object#initialize_clone から、
また Object#dup の内部で Object#initialize_dup から呼ばれます。
initialize_copy は、Ruby インタプリタが知り得......alize_copy でコピーするよう定義しておくことで、dup や clone
を再定義する必要がなくなります。
デフォルトの Object#initialize_copy は、 freeze チェックおよび型のチェックを行い self
を返すだけのメソッドです。
initialize_copy と......Error レシーバが freeze されているか、obj のクラスがレシーバ
のクラスと異なる場合に発生します。
@see Object#clone,Object#dup
以下に例として、dup や clone がこのメソッドをどのように利用しているかを示します。
obj.dup は、... -
Object
# initialize _ clone(obj) -> object (9238.0) -
Object#clone がオブジェクトを複製する際に呼び出すメソッドです。
...
Object#clone がオブジェクトを複製する際に呼び出すメソッドです。
デフォルトでは Object#initialize_copy を呼び出します。
initialize_clone という名前のメソッドは自動的に private に設定されます。
@see Object#initialize_copy, Object#initi... -
Object
# initialize _ dup(obj) -> object (9238.0) -
Object#dup がオブジェクトを複製する際に呼び出すメソッドです。
...
Object#dup がオブジェクトを複製する際に呼び出すメソッドです。
デフォルトでは Object#initialize_copy を呼び出します。
initialize_dup という名前のメソッドは自動的に private に設定されます。
@see Object#initialize_copy, Object#initializ... -
Object
# instance _ variable _ set(var , value) -> object (9228.0) -
オブジェクトのインスタンス変数 var に値 value を設定します。
...value を返します。
//emlist[][ruby]{
obj = Object.new
p obj.instance_variable_set("@foo", 1) #=> 1
p obj.instance_variable_set(:@foo, 2) #=> 2
p obj.instance_variable_get(:@foo) #=> 2
//}
@see Object#instance_variable_get,Object#instance_variables,Object#instance_variable_defined?... -
Object
# send(name , *args) -> object (9223.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...良い場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo......注意
methods = {1 => :foo,
2 => :bar,
3 => :baz}
# キーを使って関連するメソッドを呼び出す
# レシーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send......(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method... -
Object
# send(name , *args) { . . . . } -> object (9223.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...良い場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo......注意
methods = {1 => :foo,
2 => :bar,
3 => :baz}
# キーを使って関連するメソッドを呼び出す
# レシーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send......(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method...