種類
- インスタンスメソッド (93)
- 特異メソッド (55)
- 定数 (28)
- 文書 (22)
ライブラリ
- ビルトイン (76)
- csv (22)
- forwardable (44)
-
json
/ add / symbol (11) - ostruct (6)
-
rubygems
/ gem _ openssl (11) - sync (6)
モジュール
- Forwardable (22)
- GC (22)
-
Gem
:: SSL (11) - SingleForwardable (22)
-
Sync
_ m (6)
キーワード
-
DIGEST
_ SHA1 (11) - HeaderConverters (11)
- Marshal フォーマット (11)
- delegate (22)
-
handle
_ interrupt (11) - hash (22)
-
instance
_ delegate (11) -
json
_ create (11) -
latest
_ gc _ info (11) -
ruby 1
. 9 feature (11) -
single
_ delegate (11) - stat (11)
- table (11)
-
to
_ h (27)
検索結果
先頭5件
-
Symbol
. json _ create(hash) -> Symbol (21217.0) -
JSON のオブジェクトから Symbol のオブジェクトを生成して返します。
...JSON のオブジェクトから Symbol のオブジェクトを生成して返します。
@param hash 文字列をキー 's' に持つハッシュを指定します。... -
Sync
_ m :: SH -> Symbol (18202.0) -
共有ロックされている状態を表す定数です。 複数のスレッドが同時にオブジェクトを使用できる場合に用います。 複数のスレッドが共有ロックしている場合、 どのスレッドもオブジェクトを排他ロックできません。
共有ロックされている状態を表す定数です。
複数のスレッドが同時にオブジェクトを使用できる場合に用います。
複数のスレッドが共有ロックしている場合、
どのスレッドもオブジェクトを排他ロックできません。 -
Gem
:: SSL :: DIGEST _ SHA1 -> Symbol | Class (6201.0) -
@todo
@todo -
Proc
# hash -> Integer (6112.0) -
self のハッシュ値を返します。
...す。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に対応した以下のような Symbol と、引数名を表す Symbol の 2 要素です。
//emlist[][ruby]{
prc = proc{|x, y=42, *other|}
p prc.parameters # => x], [:opt, :y], [:rest, :other
prc =... -
Object
# hash -> Integer (6106.0) -
オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
...オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
2つのオブジェクトのハッシュ値が異なるとき、直ち......ql?(B) ならば A.hash == B.hash
の関係が満たされている必要があります。
ただし、ハッシュのキーとして Integer, Symbol, String などの特定の組み込みクラスが使われるときは、組込みのハッシュ関数が使用され、hash メソッドは呼......[][ruby]{
p self.hash #=> 2013505522753096494
p 0.hash #=> 2647535320520409998
p 0.0.hash #=> -2975129765814025835
p nil.hash #=> 2401531420355998067
p "ruby".hash #=> 4460896024486900438
p "ruby".hash #=> 4460896024486900438
p :ruby.hash #=> 3979895509189707770
p :ruby.hash #=> 397989550918... -
Marshal フォーマット (6084.0)
-
Marshal フォーマット フォーマットバージョン 4.8 を元に記述しています。
...Marshal フォーマット
フォーマットバージョン 4.8 を元に記述しています。
=== nil, true, false
それぞれ、'0', 'T', 'F' になります。
//emlist[][ruby]{
p Marshal.dump(nil).unpack1("x2 a*") # => "0"
p Marshal.dump(true).unpack1("x2 a*") # => "T"
p Marshal.dump......記の
形式 2 との区別のためです。
//emlist[例][ruby]{
p Marshal.dump(-1).unpack1("x2 a*") # => "i\xFA"
p Marshal.dump(0).unpack1("x2 a*") # => "i\x00"
p Marshal.dump(1).unpack1("x2 a*") # => "i\x06"
p Marshal.dump(2).unpack1("x2 a*") # => "i\a" ("i\x07")
//}
形式 1 の範囲......rray, Hash のサブクラス (インスタンス変数なし)
'C' で始まるデータ構造になります。
//emlist{
| 'C' | クラス名(Symbol)の dump | 親クラスのインスタンスの dump |
//}
//emlist[例 1][ruby]{
class Foo < Array # (or String, Regexp, Hash)
end
p Marshal.dump... -
GC
. stat(result _ hash = {}) -> {Symbol => Integer} (207.0) -
GC 内部の統計情報を Hash で返します。
...GC 内部の統計情報を Hash で返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。
@param key 得ら......れる統計情報から特定の情報を取得したい場合にキーを
Symbol で指定します。
@return GC 内部の統計情報をHash で返します。
引数 key を指定した場合は数値を返します。
GC.stat
# =>
{
:count=>2,
:heap_used=>9,......ct=>838,
:malloc_increase=>181034,
:malloc_limit=>16777216,
:minor_gc_count=>2,
:major_gc_count=>0,
:remembered_shady_object=>55,
:remembered_shady_object_limit=>0,
:old_object=>2422,
:old_object_limit=>0,
:oldmalloc_increase=>277386,
:oldmalloc_limit=>1677721......れる統計情報から特定の情報を取得したい場合にキーを
Symbol で指定します。
@return GC 内部の統計情報をHash で返します。
引数 key を指定した場合は数値を返します。
GC.stat
# =>
{
:count=>0,
:heap_alloca... -
GC
. latest _ gc _ info(result _ hash = {}) -> Hash (206.0) -
最新のGCの情報を返します。
...最新のGCの情報を返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。
@param key 得られる情報か... -
OpenStruct
# to _ h {|name , value| block } -> Hash (117.0) -
self を各要素の名前をキー(Symbol)、要素が値のハッシュに変換して返 します。
...self を各要素の名前をキー(Symbol)、要素が値のハッシュに変換して返
します。
ブロックを指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。
//emlist[例][ruby]{
require 'ostruct'
data = OpenStruct.new("country" =>... -
Data
# to _ h -> Hash (116.0) -
self のメンバ名(Symbol)と値の組を Hash にして返します。
...self のメンバ名(Symbol)と値の組を Hash にして返します。
//emlist[例][ruby]{
Customer = Data.define(:name, :address, :zip)
Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345).to_h
# => {:name=>"Joe Smith", :address=>"123 Maple, Anytown NC", :zip=>12345}
//}
ブロックを... -
Data
# to _ h {|member , value| block } -> Hash (116.0) -
self のメンバ名(Symbol)と値の組を Hash にして返します。
...self のメンバ名(Symbol)と値の組を Hash にして返します。
//emlist[例][ruby]{
Customer = Data.define(:name, :address, :zip)
Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345).to_h
# => {:name=>"Joe Smith", :address=>"123 Maple, Anytown NC", :zip=>12345}
//}
ブロックを... -
Struct
# to _ h -> Hash (116.0) -
self のメンバ名(Symbol)と値の組を Hash にして返します。
...self のメンバ名(Symbol)と値の組を Hash にして返します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345).to_h
# => {:name=>"Joe Smith", :address=>"123 Maple, Anytown NC", :zip=>12345}
//}
[注意] 本メ......self のメンバ名(Symbol)と値の組を Hash にして返します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345).to_h
# => {:name=>"Joe Smith", :address=>"123 Maple, Anytown NC", :zip=>12345}
//}
ブロックを...