ライブラリ
- ビルトイン (1693)
- abbrev (11)
- bigdecimal (11)
-
cgi
/ core (44) -
cgi
/ session (33) -
cgi
/ session / pstore (11) - csv (44)
- dbm (55)
- drb (11)
- erb (14)
- forwardable (44)
- gdbm (66)
- ipaddr (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 / ostruct (11) -
json
/ add / range (11) -
json
/ add / rational (11) -
json
/ add / regexp (11) -
json
/ add / struct (11) -
json
/ add / symbol (11) -
json
/ add / time (11) - matrix (22)
-
minitest
/ unit (1) - mkmf (55)
-
net
/ http (55) -
net
/ imap (22) - open-uri (11)
- openssl (66)
- optparse (33)
- ostruct (54)
- pathname (11)
- pstore (55)
- rake (55)
-
rdoc
/ code _ object (11) -
rdoc
/ context (22) -
rdoc
/ text (11) -
rdoc
/ top _ level (11) -
rexml
/ document (55) -
rexml
/ sax2listener (11) -
rexml
/ streamlistener (11) -
rinda
/ rinda (44) -
rinda
/ tuplespace (55) -
rubygems
/ command (33) -
rubygems
/ commands / dependency _ command (11) -
rubygems
/ config _ file (22) -
rubygems
/ dependency _ list (11) -
rubygems
/ remote _ fetcher (11) -
rubygems
/ source _ index (33) -
rubygems
/ source _ info _ cache (55) -
rubygems
/ spec _ fetcher (22) - sdbm (55)
- set (18)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - sync (6)
- tsort (85)
-
webrick
/ cgi (11) -
webrick
/ httpauth / htdigest (11) -
webrick
/ httpauth / htpasswd (11) -
webrick
/ httprequest (44) -
webrick
/ httpresponse (22) -
webrick
/ server (11) - win32ole (11)
-
yaml
/ dbm (44)
クラス
- Array (100)
- BigDecimal (22)
- Bignum (3)
- CGI (11)
-
CGI
:: Session :: FileStore (11) -
CGI
:: Session :: MemoryStore (11) -
CGI
:: Session :: NullStore (11) -
CGI
:: Session :: PStore (11) -
CSV
:: Row (22) -
CSV
:: Table (22) - Complex (11)
- DBM (55)
-
DRb
:: DRbServer (11) - Data (8)
- Date (11)
- DateTime (11)
- ERB (14)
-
Encoding
:: Converter (44) -
Enumerator
:: ArithmeticSequence (6) - Exception (11)
- Float (11)
- GDBM (66)
-
Gem
:: Command (33) -
Gem
:: Commands :: DependencyCommand (11) -
Gem
:: ConfigFile (22) -
Gem
:: DependencyList (11) -
Gem
:: RemoteFetcher (11) -
Gem
:: SourceIndex (33) -
Gem
:: SourceInfoCache (55) -
Gem
:: SpecFetcher (22) - Hash (982)
- IPAddr (11)
-
JSON
:: State (22) - KeyError (14)
- MatchData (22)
- Matrix (11)
- Method (11)
-
MiniTest
:: Unit (1) - Module (5)
-
Net
:: IMAP (22) - Numeric (11)
- Object (55)
-
OpenSSL
:: SSL :: SSLContext (11) -
OpenSSL
:: X509 :: Extension (11) -
OpenSSL
:: X509 :: ExtensionFactory (33) -
OpenSSL
:: X509 :: Name (11) - OpenStruct (65)
- OptionParser (22)
- PStore (55)
- Pathname (11)
- Proc (16)
-
RDoc
:: CodeObject (11) -
RDoc
:: Context (22) -
RDoc
:: Options (11) -
RDoc
:: TopLevel (11) -
REXML
:: Attributes (11) -
REXML
:: DocType (11) -
REXML
:: Element (33) -
Rake
:: TaskArguments (55) - Range (22)
- Rational (22)
- Regexp (33)
-
Rinda
:: TupleEntry (11) -
Rinda
:: TupleSpace (44) -
Rinda
:: TupleSpaceProxy (44) -
RubyVM
:: InstructionSequence (11) - SDBM (55)
- Set (18)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (220)
- Struct (48)
- Symbol (11)
- Time (22)
- UnboundMethod (22)
- Vector (11)
-
WEBrick
:: CGI (11) -
WEBrick
:: GenericServer (11) -
WEBrick
:: HTTPAuth :: Htdigest (11) -
WEBrick
:: HTTPAuth :: Htpasswd (11) -
WEBrick
:: HTTPRequest (44) -
WEBrick
:: HTTPResponse (22) - WIN32OLE (11)
-
YAML
:: DBM (44)
モジュール
-
CGI
:: QueryExtension (33) - Enumerable (71)
- Forwardable (22)
-
JSON
:: Generator :: GeneratorMethods :: Array (11) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (11) -
JSON
:: Generator :: GeneratorMethods :: Float (11) -
JSON
:: Generator :: GeneratorMethods :: Hash (11) -
JSON
:: Generator :: GeneratorMethods :: Integer (11) -
JSON
:: Generator :: GeneratorMethods :: NilClass (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (33) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11) - Kernel (55)
-
Net
:: HTTPHeader (55) -
OpenURI
:: Meta (11) -
OptionParser
:: Arguable (11) -
RDoc
:: Text (11) -
REXML
:: SAX2Listener (11) -
REXML
:: StreamListener (11) - SingleForwardable (22)
-
Sync
_ m (6) - TSort (85)
キーワード
- % (11)
- < (9)
- << (11)
- <= (9)
- == (11)
- === (11)
- >= (9)
- [] (22)
- abbrev (11)
-
add
_ attributes (11) -
add
_ class _ or _ module (22) -
add
_ element (11) -
add
_ specs (11) - assoc (11)
- attributes (11)
-
cache
_ data (11) - classify (11)
- clear (11)
- clone (11)
- collect (24)
- compact (8)
- compact! (8)
-
compare
_ by _ identity (11) -
compare
_ by _ identity? (11) - config (44)
- context (11)
-
create
_ ext _ from _ hash (11) -
create
_ extension (22) -
deconstruct
_ keys (2) - default (22)
-
default
_ proc (11) - defaults (11)
- delegate (22)
- delete (33)
-
delete
_ if (22) - difference (6)
- dig (36)
- dup (11)
- each (88)
-
each
_ key (22) -
each
_ pair (22) -
each
_ strongly _ connected _ component (21) -
each
_ strongly _ connected _ component _ from (21) -
each
_ value (22) - empty? (11)
- encode (33)
- entities (11)
- eql? (55)
- equal? (11)
- except (3)
- fetch (99)
-
fetch
_ path (11) -
fetch
_ values (18) - files (11)
- filter (12)
- filter! (12)
-
find
_ gems (11) - flatten (11)
- getopts (33)
-
group
_ by (22) - gsub (44)
- gsub! (44)
-
has
_ key? (11) -
has
_ value? (11) - hash (242)
-
hash
_ old (11) - header (33)
- include? (11)
- index (7)
- inspect (22)
-
instance
_ delegate (11) - intersection (5)
- invert (44)
- invoke (11)
-
is
_ a? (11) -
keep
_ if (22) - key (18)
- key? (11)
- keys (11)
-
kind
_ of? (11) -
latest
_ cache _ data (11) -
latest
_ specs (11) - length (11)
- map (24)
- member? (11)
- merge (22)
- merge! (22)
- modifiable (11)
-
named
_ captures (22) - namespaces (11)
- owner (11)
- params (11)
-
primitive
_ convert (44) -
process
_ args (1) - query (11)
- rassoc (11)
- read (22)
-
read
_ all (22) -
read
_ cache _ data (11) - receiver (7)
- rehash (29)
- reject (66)
- reject! (22)
- replace (55)
- reset (7)
-
reset
_ cache _ for (11) - restore (44)
- result (7)
-
result
_ with _ hash (7) -
rm
_ f (11) -
rm
_ rf (11) - root? (11)
- roots (11)
-
ruby2
_ keywords (10) - select (33)
- select! (22)
-
set
_ cache _ data (11) -
set
_ form _ data (11) -
set
_ params (11) - shift (11)
-
show
_ hash (11) -
single
_ delegate (11) - size (11)
- slice (7)
-
spec
_ predecessors (11) - specs (11)
-
start
_ element (11) - starttls (22)
- store (11)
-
strip
_ hashes (11) -
strongly
_ connected _ components (11) - sub (33)
- sub! (33)
-
sync
_ sh _ locker (6) -
tag
_ start (11) - take (22)
- tally (8)
-
to
_ a (22) -
to
_ csv (11) -
to
_ h (106) -
to
_ hash (99) -
to
_ json (231) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11) -
to
_ proc (9) -
to
_ s (33) -
transform
_ keys (17) -
transform
_ keys! (17) -
transform
_ values (16) -
transform
_ values! (16) -
try
_ do (22) - tsort (11)
-
tsort
_ each (21) -
type
_ params (11) - union (6)
-
unmatched
_ alias _ lists (11) - update (44)
- value (11)
- value? (11)
- values (11)
-
values
_ at (11) -
with
_ defaults (11) - write (22)
- xsystem (11)
- | (11)
検索結果
先頭5件
-
Hash
# >(other) -> bool (39143.0) -
other が self のサブセットである場合に真を返します。
...サブセットである場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 > h2 # => false
h2 > h1 # => true
h1 > h1 # => false
//}
@see Hash#<=, Hash#<, Hash#>=... -
Hash
# to _ hash -> self (27250.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 (27214.0) -
自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。 自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
...自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。
自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
//emlist[例][ruby]{
a = {}
p a.hash #=> 0
a[1] = :x
p a.hash #=> 329543
//}... -
Hash
# rehash -> self (27213.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
# >=(other) -> bool (27125.0) -
other が self のサブセットか同じである場合に真を返します。
...セットか同じである場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 >= h2 # => false
h2 >= h1 # => true
h1 >= h1 # => true
//}
@see Hash#<=, Hash#<, Hash#>... -
Hash
# transform _ keys(hash) -> Hash (21328.0) -
すべてのキーに対してブロックを呼び出した結果で置き換えたハッシュを返します。 値は変化しません。
...ん。
@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
//emlist[例][ruby]{
h = { a: 1, b: 2, c: 3 }
h.transform_keys {|k| k.to_s } # => {"a"=>1, "b"=>2, "c"=>3}
h.transform_keys(a: "a", d: "d") # => {"a"=>1, :b=>2, :c=>3}
h.transform_key......s(&: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 (21307.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......=> MyHash
p my_hash.to_h.class # => Hash
//}
ブロックを指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。
//emlist[ブロック付きの例][ruby]{
hash = { "a" => 97, "b" => 98 }
hash.to_h {|key, value| [key.upcase, value-32] } # => {"A"=>......65, "B"=>66}
//}
@see Enumerable#map... -
Hash
# to _ h {|key , value| block } -> Hash (21307.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......=> MyHash
p my_hash.to_h.class # => Hash
//}
ブロックを指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。
//emlist[ブロック付きの例][ruby]{
hash = { "a" => 97, "b" => 98 }
hash.to_h {|key, value| [key.upcase, value-32] } # => {"A"=>......65, "B"=>66}
//}
@see Enumerable#map... -
Hash
# to _ h -> self | Hash (21294.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 (21254.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 (21233.0) -
selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。 デフォルト値はselfの設定のままです。
...to_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結果を返します
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 246,......> 300 }
h3 = { "b" => 357, "d" => 400 }
h1.merge #=> {"a"=>100, "b"=>200}
h1.merge(h2) #=> {"a"=>100, "b"=>246, "c"=>300}
h1.merge(h2, h3) #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400}
h1.merge(h2) {|key, oldval, newval| newval - oldval}
#=> {"a"=>100, "b"=>46, "c"=>......#=> {"a"=>100, "b"=>311, "c"=>300, "d"=>400}
h1 #=> {"a"=>100, "b"=>200}
//}
//emlist[][ruby]{
foo = {1 => 'a', 2 => 'b', 3 => 'c'}
bar = {2 => 'B', 3 => 'C', 4 => 'D'}
p foo.merge(bar)
# => {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo # => {1=>"a", 2=>"b", 3=>"c"}
p foo... -
Hash
# merge(*others) {|key , self _ val , other _ val| . . . } -> Hash (21233.0) -
selfとothersのハッシュの内容を順番にマージ(統合)した結果を返します。 デフォルト値はselfの設定のままです。
...to_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結果を返します
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 246,......> 300 }
h3 = { "b" => 357, "d" => 400 }
h1.merge #=> {"a"=>100, "b"=>200}
h1.merge(h2) #=> {"a"=>100, "b"=>246, "c"=>300}
h1.merge(h2, h3) #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400}
h1.merge(h2) {|key, oldval, newval| newval - oldval}
#=> {"a"=>100, "b"=>46, "c"=>......#=> {"a"=>100, "b"=>311, "c"=>300, "d"=>400}
h1 #=> {"a"=>100, "b"=>200}
//}
//emlist[][ruby]{
foo = {1 => 'a', 2 => 'b', 3 => 'c'}
bar = {2 => 'B', 3 => 'C', 4 => 'D'}
p foo.merge(bar)
# => {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo # => {1=>"a", 2=>"b", 3=>"c"}
p foo... -
Hash
# merge(other) -> Hash (21233.0) -
selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
...to_hashを使って暗黙の変換を試みます。
@param other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結果を返します
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 254,......=> 300 }
h1.merge() # => {"a"=>100, "b"=>200}
h1.merge(h2) # => {"a"=>100, "b"=>254, "c"=>300}
h1.merge(h2){|key, oldval, newval| newval - oldval}
# => {"a"=>100, "b"=>54, "c"=>300}
h1 # => {"a"=>100, "b"=>200}
//}
//emlist[][ruby]{
foo = {1 => 'a', 2 => 'b', 3 =>......bar = {2 => 'B', 3 => 'C', 4 => 'D'}
p foo.merge(bar)
# => {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo # => {1=>"a", 2=>"b", 3=>"c"}
p foo.merge!(bar) {|key, foo_val, bar_val| foo_val + bar_val }
# => {1=>"a", 2=>"bB", 3=>"cC", 4=>"D"}
p foo # => {1=>"a", 2=>"bB", 3=>"cC", 4=>"D"}
//}... -
Hash
# merge(other) {|key , self _ val , other _ val| . . . } -> Hash (21233.0) -
selfとotherのハッシュの内容をマージ(統合)した結果を返します。デフォルト値はselfの設定のままです。
...to_hashを使って暗黙の変換を試みます。
@param other マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージした結果を返します
//emlist[][ruby]{
h1 = { "a" => 100, "b" => 200 }
h2 = { "b" => 254,......=> 300 }
h1.merge() # => {"a"=>100, "b"=>200}
h1.merge(h2) # => {"a"=>100, "b"=>254, "c"=>300}
h1.merge(h2){|key, oldval, newval| newval - oldval}
# => {"a"=>100, "b"=>54, "c"=>300}
h1 # => {"a"=>100, "b"=>200}
//}
//emlist[][ruby]{
foo = {1 => 'a', 2 => 'b', 3 =>......bar = {2 => 'B', 3 => 'C', 4 => 'D'}
p foo.merge(bar)
# => {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo # => {1=>"a", 2=>"b", 3=>"c"}
p foo.merge!(bar) {|key, foo_val, bar_val| foo_val + bar_val }
# => {1=>"a", 2=>"bB", 3=>"cC", 4=>"D"}
p foo # => {1=>"a", 2=>"bB", 3=>"cC", 4=>"D"}
//}...