ライブラリ
- ビルトイン (1927)
- abbrev (12)
- bigdecimal (12)
-
cgi
/ core (72) -
cgi
/ session (36) -
cgi
/ session / pstore (12) - csv (51)
- date (4)
- dbm (60)
- drb (12)
- erb (16)
- forwardable (48)
- gdbm (72)
- ipaddr (12)
- json (156)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / symbol (12) -
json
/ add / time (12) - matrix (24)
-
minitest
/ unit (1) - mkmf (60)
-
net
/ http (72) -
net
/ imap (24) - open-uri (12)
- openssl (84)
- optparse (36)
- ostruct (60)
- pathname (12)
- pstore (72)
- rake (60)
-
rdoc
/ code _ object (12) -
rdoc
/ context (36) -
rdoc
/ text (12) -
rdoc
/ top _ level (12) -
rexml
/ document (72) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (12) -
rinda
/ rinda (48) -
rinda
/ tuplespace (60) -
rubygems
/ command (48) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ config _ file (24) -
rubygems
/ dependency _ list (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ source _ index (36) -
rubygems
/ source _ info _ cache (60) -
rubygems
/ spec _ fetcher (24) - sdbm (60)
- set (14)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - sync (12)
- tsort (93)
-
webrick
/ cgi (12) -
webrick
/ httpauth / htdigest (12) -
webrick
/ httpauth / htpasswd (12) -
webrick
/ httprequest (48) -
webrick
/ httpresponse (24) -
webrick
/ server (12) - win32ole (12)
-
yaml
/ dbm (48)
クラス
- Array (113)
- BigDecimal (24)
- Bignum (3)
- CGI (24)
-
CGI
:: Session :: FileStore (12) -
CGI
:: Session :: MemoryStore (12) -
CGI
:: Session :: NullStore (12) -
CGI
:: Session :: PStore (12) -
CSV
:: Row (27) -
CSV
:: Table (24) - Complex (12)
- DBM (60)
-
DRb
:: DRbServer (12) - Data (12)
- Date (14)
- DateTime (14)
- ERB (16)
-
Encoding
:: Converter (48) -
Enumerator
:: ArithmeticSequence (7) - Exception (12)
- Float (12)
- GDBM (72)
-
Gem
:: Command (48) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: ConfigFile (24) -
Gem
:: DependencyList (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: SourceIndex (36) -
Gem
:: SourceInfoCache (60) -
Gem
:: SpecFetcher (24) - Hash (1116)
- IPAddr (12)
-
JSON
:: State (24) - KeyError (16)
- MatchData (26)
- Matrix (12)
- Method (12)
-
MiniTest
:: Unit (1) - Module (12)
-
Net
:: IMAP (24) - Numeric (12)
- Object (60)
-
OpenSSL
:: Config (12) -
OpenSSL
:: SSL :: SSLContext (12) -
OpenSSL
:: X509 :: Extension (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) -
OpenSSL
:: X509 :: Name (12) - OpenStruct (72)
- OptionParser (24)
- PStore (72)
- Pathname (12)
- Proc (18)
-
RDoc
:: CodeObject (12) -
RDoc
:: Context (36) -
RDoc
:: Options (12) -
RDoc
:: TopLevel (12) -
REXML
:: Attributes (12) -
REXML
:: DocType (12) -
REXML
:: Element (48) -
Rake
:: TaskArguments (60) - Range (24)
- Rational (24)
- Regexp (36)
-
Rinda
:: TupleEntry (12) -
Rinda
:: TupleSpace (48) -
Rinda
:: TupleSpaceProxy (48) -
RubyVM
:: InstructionSequence (12) - SDBM (60)
- Set (20)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (240)
- Struct (59)
- Symbol (12)
- Time (26)
- UnboundMethod (24)
- Vector (12)
-
WEBrick
:: CGI (12) -
WEBrick
:: GenericServer (12) -
WEBrick
:: HTTPAuth :: Htdigest (12) -
WEBrick
:: HTTPAuth :: Htpasswd (12) -
WEBrick
:: HTTPRequest (48) -
WEBrick
:: HTTPResponse (24) - WIN32OLE (12)
-
YAML
:: DBM (48)
モジュール
-
CGI
:: QueryExtension (48) - Enumerable (81)
- Forwardable (24)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (36) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (60)
-
Net
:: HTTPHeader (72) -
OpenURI
:: Meta (12) -
OptionParser
:: Arguable (12) -
RDoc
:: Text (12) -
REXML
:: SAX2Listener (12) -
REXML
:: StreamListener (12) - SingleForwardable (24)
-
Sync
_ m (12) - TSort (93)
キーワード
- % (12)
- < (10)
- << (12)
- <= (10)
- == (12)
- === (12)
- > (10)
- >= (10)
- [] (24)
- []= (36)
- abbrev (12)
-
add
_ attributes (12) -
add
_ class _ or _ module (24) -
add
_ element (12) -
add
_ specs (12) - assoc (12)
- attributes (12)
-
cache
_ data (12) - classify (12)
- clear (12)
- clone (12)
- collect (28)
- compact (9)
- compact! (9)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - config (48)
- context (12)
- context= (12)
-
create
_ ext _ from _ hash (12) -
create
_ extension (24) -
deconstruct
_ keys (20) - default (24)
- default= (12)
-
default
_ proc (12) -
default
_ proc= (12) - defaults (12)
- defaults= (12)
- delegate (24)
- delete (36)
-
delete
_ if (24) - difference (7)
- dig (40)
- dup (12)
- each (96)
-
each
_ key (24) -
each
_ pair (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) -
each
_ value (24) - empty? (12)
- encode (36)
- entities (12)
- eql? (60)
- equal? (12)
- except (4)
- fetch (108)
-
fetch
_ path (12) -
fetch
_ values (20) - files (12)
- filter (14)
- filter! (14)
-
find
_ gems (12) - flatten (12)
-
form
_ data= (12) - getopts (36)
-
group
_ by (24) - gsub (48)
- gsub! (48)
-
has
_ key? (12) -
has
_ value? (12) - hash (265)
-
hash
_ old (12) - header (36)
- include? (12)
- index (7)
- inspect (24)
-
instance
_ delegate (12) - intersection (6)
- invert (48)
- invoke (12)
-
is
_ a? (12) -
keep
_ if (24) - key (20)
- key? (12)
- keys (12)
-
kind
_ of? (12) -
latest
_ cache _ data (12) -
latest
_ specs (12) - length (12)
- map (28)
- member? (12)
- merge (24)
- merge! (24)
- modifiable (12)
-
named
_ captures (24) - namespaces (12)
- out (12)
- owner (12)
- params (12)
- params= (12)
-
primitive
_ convert (48) -
process
_ args (1) - query (12)
- rassoc (12)
- read (24)
-
read
_ all (24) -
read
_ cache _ data (12) - receiver (8)
- rehash (30)
- reject (72)
- reject! (24)
- replace (60)
- reset (8)
-
reset
_ cache _ for (12) - restore (48)
- result (8)
-
result
_ with _ hash (8) -
rm
_ f (12) -
rm
_ rf (12) - root? (12)
- roots (12)
-
ruby2
_ keywords (18) - select (36)
- select! (24)
-
set
_ cache _ data (12) -
set
_ form _ data (12) -
set
_ params (12) - shift (12)
-
show
_ hash (12) -
single
_ delegate (12) - size (12)
- slice (8)
-
spec
_ predecessors (12) - specs (12)
-
start
_ element (12) - starttls (24)
- store (12)
-
strip
_ hashes (12) -
strongly
_ connected _ components (12) - sub (36)
- sub! (36)
-
sync
_ sh _ locker (6) -
sync
_ sh _ locker= (6) -
tag
_ start (12) - take (24)
- tally (10)
-
to
_ a (24) -
to
_ csv (12) -
to
_ h (120) -
to
_ hash (108) -
to
_ json (252) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ proc (10) -
to
_ s (36) -
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) -
try
_ do (24) - tsort (12)
-
tsort
_ each (23) -
type
_ params (12) - union (7)
-
unmatched
_ alias _ lists (12) -
unmatched
_ alias _ lists= (12) - update (48)
- value (12)
- value? (12)
- values (12)
-
values
_ at (12) -
with
_ defaults (12) - write (24)
- xsystem (12)
- | (12)
検索結果
先頭5件
-
Hash
# to _ hash -> self (27150.0) -
self を返します。
...self を返します。
//emlist[例][ruby]{
hash = {}
p hash.to_hash # => {}
p hash.to_hash == hash # => true
//}
@see Object#to_hash, Hash#to_h... -
Hash
# hash -> Integer (27114.0) -
自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。 自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
...自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。
自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
//emlist[例][ruby]{
a = {}
p a.hash #=> 0
a[1] = :x
p a.hash #=> 329543
//}... -
Hash
# rehash -> self (27113.0) -
キーのハッシュ値を再計算します。
...raise RuntimeError Hash#eachなどのイテレータの評価途中でrehashすると発生します。
@return selfを返します。
//emlist[例][ruby]{
a = [ "a", "b" ]
h = { a => 100 }
p h[a] #=> 100
a[0] = "z"
p h[a] #=> nil
h.rehash
p h[a] #=> 100
//}
@see Object#hash... -
Hash
# transform _ keys(hash) -> Hash (21228.0) -
すべてのキーに対してブロックを呼び出した結果で置き換えたハッシュを返します。 値は変化しません。
...べてのキーに対してブロックを呼び出した結果で置き換えたハッシュを返します。
値は変化しません。
@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
//emlist[例][ruby]{
h = { a: 1, b: 2, c: 3 }
h.tran......") # => {"a"=>1, :b=>2, :c=>3}
h.transform_keys(&:to_s) # => {"a"=>1, "b"=>2, "c"=>3}
h.transform_keys.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}
@see Hash#transform_keys!
@see Hash#transform_values
@see Hash#transform_values!... -
Hash
# to _ h -> self | Hash (21207.0) -
self を返します。Hash クラスのサブクラスから呼び出した場合は self を Hash オブジェクトに変換します。
...す。Hash クラスのサブクラスから呼び出した場合は
self を Hash オブジェクトに変換します。
//emlist[例][ruby]{
hash = {}
p hash.to_h # => {}
p hash.to_h == hash # => true
class MyHash < Hash;end
my_hash = MyHash.new
p my_hash.to_h # => {}
p my_hash.clas......s # => MyHash
p my_hash.to_h.class # => Hash
//}
ブロックを指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。
//emlist[ブロック付きの例][ruby]{
hash = { "a" => 97, "b" => 98 }
hash.to_h {|key, value| [key.upcase, value-32] } #... -
Hash
# to _ h {|key , value| block } -> Hash (21207.0) -
self を返します。Hash クラスのサブクラスから呼び出した場合は self を Hash オブジェクトに変換します。
...す。Hash クラスのサブクラスから呼び出した場合は
self を Hash オブジェクトに変換します。
//emlist[例][ruby]{
hash = {}
p hash.to_h # => {}
p hash.to_h == hash # => true
class MyHash < Hash;end
my_hash = MyHash.new
p my_hash.to_h # => {}
p my_hash.clas......s # => MyHash
p my_hash.to_h.class # => Hash
//}
ブロックを指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。
//emlist[ブロック付きの例][ruby]{
hash = { "a" => 97, "b" => 98 }
hash.to_h {|key, value| [key.upcase, value-32] } #... -
Hash
# to _ h -> self | Hash (21194.0) -
self を返します。Hash クラスのサブクラスから呼び出した場合は self を Hash オブジェクトに変換します。
...す。Hash クラスのサブクラスから呼び出した場合は
self を Hash オブジェクトに変換します。
//emlist[例][ruby]{
hash = {}
p hash.to_h # => {}
p hash.to_h == hash # => true
class MyHash < Hash;end
my_hash = MyHash.new
p my_hash.to_h # => {}
p my_hash.clas......s # => MyHash
p my_hash.to_h.class # => Hash
//}... -
Hash
# compact -> Hash (21154.0) -
compact は自身から value が nil のもの取り除いた Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
...た Hash を生成して返します。 compact! は自身から破壊的に value が nil のものを取り除き、変更が行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
hash = {a: 1, b: nil, c: 3}
p hash.compact #=> {:a=>1, :c=>3}
p hash......#=> {:a=>1, :b=>nil, :c=>3}
hash.compact!
hash #=> {:a=>1, :c=>3}
p hash.compact! #=> nil
//}
@see Array#compact... -
Hash
# merge(*others) -> Hash (21133.0) -
selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。 デフォルト値はselfの設定のままです。
...値を使います。
othersがハッシュではない場合、othersのメソッドto_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結......to_hash
{:Australia => 'Sydney',
:France => 'Paris'
}
end
end
h = {:Germany => 'Berlin',
:Australia => 'Canberra',
:France => 'Paris'
}
# 暗黙の変換
p h.merge(Foo.new) # => {:Germany=>"Berlin", :Australia=>"Sydney", :France=>"Paris"}
//}
@see Hash#update,Hash#r... -
Hash
# merge(*others) {|key , self _ val , other _ val| . . . } -> Hash (21133.0) -
selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。 デフォルト値はselfの設定のままです。
...値を使います。
othersがハッシュではない場合、othersのメソッドto_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結......to_hash
{:Australia => 'Sydney',
:France => 'Paris'
}
end
end
h = {:Germany => 'Berlin',
:Australia => 'Canberra',
:France => 'Paris'
}
# 暗黙の変換
p h.merge(Foo.new) # => {:Germany=>"Berlin", :Australia=>"Sydney", :France=>"Paris"}
//}
@see Hash#update,Hash#r... -
Hash
# merge(other) -> Hash (21133.0) -
selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
...の値を使います。
otherがハッシュではない場合、otherのメソッドto_hashを使って暗黙の変換を試みます。
@param other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結......to_hash
{:Australia => 'Sydney',
:France => 'Paris'
}
end
end
h = {:Germany => 'Berlin',
:Australia => 'Canberra',
:France => 'Paris'
}
# 暗黙の変換
p h.merge(Foo.new) # => {:Germany=>"Berlin", :Australia=>"Sydney", :France=>"Paris"}
//}
@see Hash#update,Hash#r... -
Hash
# merge(other) {|key , self _ val , other _ val| . . . } -> Hash (21133.0) -
selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
...の値を使います。
otherがハッシュではない場合、otherのメソッドto_hashを使って暗黙の変換を試みます。
@param other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結......to_hash
{:Australia => 'Sydney',
:France => 'Paris'
}
end
end
h = {:Germany => 'Berlin',
:Australia => 'Canberra',
:France => 'Paris'
}
# 暗黙の変換
p h.merge(Foo.new) # => {:Germany=>"Berlin", :Australia=>"Sydney", :France=>"Paris"}
//}
@see Hash#update,Hash#r... -
Hash
# except(*keys) -> Hash (21130.0) -
引数で指定された以外のキーとその値だけを含む Hash を返します。
...引数で指定された以外のキーとその値だけを含む Hash を返します。
引数に指定されていて Hash に存在しないキーは無視されます。
//emlist[][ruby]{
h = { a: 100, b: 200, c: 300 }
h.except(:a) # => {:b=>200, :c=>300}
//}
@see Hash#slice, ENV.except... -
Hash
# transform _ keys {|key| . . . } -> Hash (21128.0) -
すべてのキーに対してブロックを呼び出した結果で置き換えたハッシュを返します。 値は変化しません。
...べてのキーに対してブロックを呼び出した結果で置き換えたハッシュを返します。
値は変化しません。
@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
//emlist[例][ruby]{
h = { a: 1, b: 2, c: 3 }
h.tran......") # => {"a"=>1, :b=>2, :c=>3}
h.transform_keys(&:to_s) # => {"a"=>1, "b"=>2, "c"=>3}
h.transform_keys.with_index {|k, i| "#{k}.#{i}" }
# => {"a.0"=>1, "b.1"=>2, "c.2"=>3}
//}
@see Hash#transform_keys!
@see Hash#transform_values
@see Hash#transform_values!...