ライブラリ
- ビルトイン (1726)
- abbrev (11)
- bigdecimal (11)
-
cgi
/ core (66) -
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 (66) -
net
/ imap (22) - open-uri (11)
- openssl (77)
- optparse (33)
- ostruct (54)
- pathname (11)
- pstore (66)
- rake (55)
-
rdoc
/ code _ object (11) -
rdoc
/ context (33) -
rdoc
/ text (11) -
rdoc
/ top _ level (11) -
rexml
/ document (66) -
rexml
/ sax2listener (11) -
rexml
/ streamlistener (11) -
rinda
/ rinda (44) -
rinda
/ tuplespace (55) -
rubygems
/ command (44) -
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 (12)
- 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 (22)
-
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 (44) -
Gem
:: Commands :: DependencyCommand (11) -
Gem
:: ConfigFile (22) -
Gem
:: DependencyList (11) -
Gem
:: RemoteFetcher (11) -
Gem
:: SourceIndex (33) -
Gem
:: SourceInfoCache (55) -
Gem
:: SpecFetcher (22) - Hash (1015)
- 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
:: Config (11) -
OpenSSL
:: SSL :: SSLContext (11) -
OpenSSL
:: X509 :: Extension (11) -
OpenSSL
:: X509 :: ExtensionFactory (33) -
OpenSSL
:: X509 :: Name (11) - OpenStruct (65)
- OptionParser (22)
- PStore (66)
- Pathname (11)
- Proc (16)
-
RDoc
:: CodeObject (11) -
RDoc
:: Context (33) -
RDoc
:: Options (11) -
RDoc
:: TopLevel (11) -
REXML
:: Attributes (11) -
REXML
:: DocType (11) -
REXML
:: Element (44) -
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 (44) - 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 (66) -
OpenURI
:: Meta (11) -
OptionParser
:: Arguable (11) -
RDoc
:: Text (11) -
REXML
:: SAX2Listener (11) -
REXML
:: StreamListener (11) - SingleForwardable (22)
-
Sync
_ m (12) - TSort (85)
キーワード
- % (11)
- < (9)
- << (11)
- <= (9)
- == (11)
- === (11)
- > (9)
- >= (9)
- [] (22)
- []= (33)
- 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)
- context= (11)
-
create
_ ext _ from _ hash (11) -
create
_ extension (22) -
deconstruct
_ keys (2) - default (22)
- default= (11)
-
default
_ proc (11) -
default
_ proc= (11) - defaults (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)
-
form
_ data= (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)
- out (11)
- owner (11)
- params (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) -
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) -
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
# default -> object | nil (21049.0) -
ハッシュのデフォルト値を返します。
...nil になることに注意してください。この場合、ハッシュのデフォルト値に
ついて調べるには 2 番目の形式か Hash#default_proc を使ってください。
2 番目の形式はハッシュがデフォルト値としてブロックを持つ場合に、
self と......emlist[例][ruby]{
h = Hash.new("default")
p h.default #=> "default"
p h.default(:some) #=> "default"
p h #=>{}
h = Hash.new{|hash, key| hash[key] ="default" }
p h.default #=> nil
p h.default(:some) #=> "default"
p h #=> {:some=>"default"}
h = Hash.new
p h.default......#=> nil
p h.default(:some) #=> nil
p h #=> {}
//}
@see Hash#default=, Hash#default_proc... -
Hash
# default(key) -> object | nil (21049.0) -
ハッシュのデフォルト値を返します。
...nil になることに注意してください。この場合、ハッシュのデフォルト値に
ついて調べるには 2 番目の形式か Hash#default_proc を使ってください。
2 番目の形式はハッシュがデフォルト値としてブロックを持つ場合に、
self と......emlist[例][ruby]{
h = Hash.new("default")
p h.default #=> "default"
p h.default(:some) #=> "default"
p h #=>{}
h = Hash.new{|hash, key| hash[key] ="default" }
p h.default #=> nil
p h.default(:some) #=> "default"
p h #=> {:some=>"default"}
h = Hash.new
p h.default......#=> nil
p h.default(:some) #=> nil
p h #=> {}
//}
@see Hash#default=, Hash#default_proc... -
Hash
# replace(other) -> self (21049.0) -
ハッシュの内容を other の内容で置き換えます。
...ます。
otherがハッシュではない場合、otherのメソッドto_hashを使って暗黙の変換を試みます。
self = other.to_hash.dup と同じです。
@param other ハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return self......{2 => 'B', 3 => 'C'}
foo.replace(bar)
p foo #=> {2=>"B", 3=>"C"}
zoo = {}
zoo = bar.dup
p zoo #=> {2=>"B", 3=>"C"}
class Foo
def to_hash
{:japan => 'kyoto'}
end
end
h = Hash.new
h.replace(Foo.new) #暗黙の変換
p h #=> {:japan=>"kyoto"}
//}
@see Hash#dup,Hash#merge,Object#to_hash... -
Hash
# default _ proc=(pr) (21043.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを 変更します。
...前のデフォルトは値(Hash#default)の場合も
Proc の場合(Hash#default_proc)でも上書きされます。
引数には to_proc で Proc オブジェクトに変換できる
オブジェクトも受け付けます。
nil を指定した場合は現在の Hash#default_proc をクリア......します。
@param pr デフォルト値を返す手続きオブジェクト
//emlist[例][ruby]{
h = {}
h.default_proc = proc do |hash, key|
hash[key] = case
when (key % 15).zero?
"FizzBuzz"
when (key % 5).zero?
"Buzz"......2] # => 2
p h[3] # => "Fizz"
p h[5] # => "Buzz"
p h[15] # => "FizzBuzz"
h.default_proc = nil
p h[16] # => nil
# default_proc が nil になったので `16=>16 が追加されていない`
p h # => {1=>1, 2=>2, 3=>"Fizz", 5=>"Buzz", 15=>"FizzBuzz"}
//}
@see Hash#default_proc, Hash#default... -
Hash
# default _ proc -> Proc | nil (21031.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを返します。 ハッシュがブロック形式のデフォルト値を持たない場合 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... -
Hash
# transform _ keys -> Enumerator (21028.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
# reject -> Enumerator (21026.0) -
self を複製して、ブロックを評価した値が真になる要 素を削除したハッシュを返します。
...す。
selfを破壊的に変更したい場合はかわりにHash#delete_ifかHash#reject!を使います。
//emlist[例][ruby]{
h = { 2 =>"8" ,4 =>"6" ,6 =>"4" ,8 =>"2" }
p h.reject{|key, value| key.to_i < value.to_i} #=> {6=>"4", 8=>"2"}
//}
@see Hash#delete_if,Hash#delete,Enumerable#reject... -
Hash
# transform _ keys! -> Enumerator (21026.0) -
すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。 値は変化しません。
...すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。
値は変化しません。
@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
@return transform_keys! は常に self を返しま......# => {:a=>1, :b=>2, :c=>3}
h.transform_keys!(a: "a", d: "d") # => {"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
# transform _ keys! {|key| . . . } -> self (21026.0) -
すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。 値は変化しません。
...すべてのキーに対してブロックを呼び出した結果でハッシュのキーを変更します。
値は変化しません。
@param hash 置き換え前のキーから置き換え後のキーへのハッシュを指定します。
@return transform_keys! は常に self を返しま......# => {:a=>1, :b=>2, :c=>3}
h.transform_keys!(a: "a", d: "d") # => {"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
# <(other) -> bool (21025.0) -
self が other のサブセットである場合に真を返します。
...サブセットである場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 < h2 # => true
h2 < h1 # => false
h1 < h1 # => false
//}
@see Hash#<=, Hash#>=, Hash#>... -
Hash
# <=(other) -> bool (21025.0) -
self が other のサブセットか同じである場合に真を返します。
...セットか同じである場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 <= h2 # => true
h2 <= h1 # => false
h1 <= h1 # => true
//}
@see Hash#<, Hash#>=, Hash#>... -
Hash
# >(other) -> bool (21025.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
# >=(other) -> bool (21025.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#>...