395件ヒット
[201-300件を表示]
(0.183秒)
ライブラリ
- ビルトイン (243)
- bigdecimal (12)
- csv (12)
-
irb
/ context (24) -
irb
/ ext / math-mode (8) -
irb
/ inspector (12) - openssl (36)
-
shell
/ filter (6) - thwait (6)
- win32ole (24)
- zlib (12)
クラス
-
ARGF
. class (24) - BigDecimal (12)
-
CSV
:: Table (12) - Complex (12)
- FalseClass (24)
- Float (24)
- Hash (12)
-
IRB
:: Context (32) -
IRB
:: Inspector (12) - Module (51)
- Object (12)
-
OpenSSL
:: HMAC (36) - Rational (24)
-
Shell
:: Filter (6) - Symbol (12)
- Thread (12)
-
Thread
:: Backtrace :: Location (12) - ThreadsWait (6)
- TrueClass (12)
- UnboundMethod (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12) -
Zlib
:: GzipFile :: Error (12)
キーワード
- [] (12)
-
all
_ waits (6) -
bind
_ call (12) -
const
_ added (3) -
const
_ missing (12) -
default
_ proc (12) - handler= (12)
- hexdigest (12)
-
initialize
_ copy (12) - inspect? (12)
-
inspect
_ mode (12) -
inspect
_ value (12) - math? (4)
-
math
_ mode (4) - name (12)
-
to
_ s (72)
検索結果
先頭5件
-
IRB
:: Context # inspect? -> bool (6230.0) -
IRB::Context#inspect_mode が有効かどうかを返します。
...IRB::Context#inspect_mode が有効かどうかを返します。
@return 出力結果に to_s したものを表示する場合は false を返します。それ
以外の場合は true を返します。
@see IRB::Context#inspect_mode, IRB::Context#inspect_mode=... -
IRB
:: Context # inspect _ mode -> object | nil (6208.0) -
実行結果の出力方式を返します。
...実行結果の出力方式を返します。
@see IRB::Context#inspect_mode=... -
Hash
# default _ proc -> Proc | nil (6107.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを返します。 ハッシュがブロック形式のデフォルト値を持たない場合 nil を返します。
...合 nil を返します。
//emlist[例][ruby]{
h = Hash.new {|hash, key| "The #{key} not exist in #{hash.inspect}"}
p h.default #=> nil
p block = h.default_proc #=> #<Proc:0x0x401a9ff4>
p block.call({},:foo) #=> "The foo not exist in {}"
h = Hash.new("default")
p h.default......#=> "default"
p h.default_proc #=> nil
//}
@see Hash#default... -
Object
# initialize _ copy(obj) -> object (6107.0) -
(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。
...メソッドは self を obj の内容で置き換えます。ただ
し、self のインスタンス変数や特異メソッドは変化しません。
デフォルトでは、Object#clone の内部で Object#initialize_clone から、
また Object#dup の内部で Object#initialize_dup から呼......tialize_copy は、Ruby インタプリタが知り得ない情報をコピーするた
めに使用(定義)されます。例えば C 言語でクラスを実装する場合、情報
をインスタンス変数に保持させない場合がありますが、そういった内部情
報を initializ......う定義しておくことで、dup や clone
を再定義する必要がなくなります。
デフォルトの Object#initialize_copy は、 freeze チェックおよび型のチェックを行い self
を返すだけのメソッドです。
initialize_copy という名前のメソッドは... -
ThreadsWait
# all _ waits -> () (6107.0) -
指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。
...用例
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}
# 出力例
#=> #<Thread:0x214bc run>
#=> #<Thread:0x21548 run>
#=> #<T... -
UnboundMethod
# bind _ call(recv , *args) -> object (6107.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
UnboundMethod
# bind _ call(recv , *args) { . . . } -> object (6107.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
Module
# name -> String | nil (6102.0) -
モジュールやクラスの名前を文字列で返します。
...は nil を、それ以外はオブジェクト ID の文字列を返します。
//emlist[例][ruby]{
module A
module B
end
p B.name #=> "A::B"
class C
end
end
p A.name #=> "A"
p A::B.name #=> "A::B"
p A::C.name #=> "A::C"
# 名前のないモジュール / クラス
p Module.new.......name #=> nil
p Class.new.name #=> nil
p Module.new.to_s #=> "#<Module:0x00007f90b09112c8>"
p Class.new.to_s #=> "#<Class:0x00007fa5c40b41b0>"
//}... -
ARGF
. class # to _ s -> String (6002.0) -
常に文字列 "ARGF" を返します。
常に文字列 "ARGF" を返します。 -
FalseClass
# to _ s -> String (6002.0) -
常に文字列 "false" を返します。
...常に文字列 "false" を返します。
//emlist[例][ruby]{
false.to_s # => "false"
//}...