2064件ヒット
[1-100件を表示]
(0.114秒)
ライブラリ
- ビルトイン (764)
- bigdecimal (12)
-
cgi
/ core (12) - csv (3)
- date (4)
- dbm (60)
- drb (12)
- erb (8)
- forwardable (48)
- gdbm (72)
- ipaddr (12)
- json (132)
-
json
/ add / bigdecimal (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) - mkmf (36)
-
net
/ http (72) -
net
/ imap (24) - openssl (24)
- ostruct (22)
- pstore (24)
- rake (12)
-
rdoc
/ code _ object (12) -
rdoc
/ context (36) -
rdoc
/ text (12) -
rdoc
/ top _ level (12) -
rexml
/ document (36) -
rinda
/ rinda (48) -
rinda
/ tuplespace (60) -
rubygems
/ command (48) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ dependency _ list (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ source _ index (36) -
rubygems
/ source _ info _ cache (60) - sdbm (60)
-
shell
/ command-processor (6) - tsort (81)
-
webrick
/ httpauth / htdigest (12) -
webrick
/ httpauth / htpasswd (12) -
webrick
/ httprequest (12) -
webrick
/ httpresponse (12) -
yaml
/ dbm (48)
クラス
- Array (24)
- BigDecimal (24)
- CGI (12)
-
CSV
:: Row (3) - DBM (60)
-
DRb
:: DRbServer (12) - Data (12)
- Date (14)
- DateTime (14)
- ERB (8)
-
Encoding
:: Converter (48) - GDBM (72)
-
Gem
:: Command (48) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: DependencyList (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: SourceIndex (36) -
Gem
:: SourceInfoCache (60) - Hash (442)
- IPAddr (12)
- MatchData (26)
- Method (12)
- Module (12)
-
Net
:: IMAP (24) - Object (24)
-
OpenSSL
:: X509 :: ExtensionFactory (12) -
OpenSSL
:: X509 :: Name (12) - OpenStruct (22)
- PStore (24)
- Proc (6)
-
RDoc
:: CodeObject (12) -
RDoc
:: Context (36) -
RDoc
:: Options (12) -
RDoc
:: TopLevel (12) -
REXML
:: DocType (12) -
REXML
:: Element (24) -
Rake
:: TaskArguments (12) - Rational (12)
- Regexp (24)
-
Rinda
:: TupleEntry (12) -
Rinda
:: TupleSpace (48) -
Rinda
:: TupleSpaceProxy (48) - SDBM (60)
-
Shell
:: CommandProcessor (6) - String (96)
- Struct (16)
- Time (2)
- UnboundMethod (24)
-
WEBrick
:: HTTPAuth :: Htdigest (12) -
WEBrick
:: HTTPAuth :: Htpasswd (12) -
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (12) -
YAML
:: DBM (48)
モジュール
- Enumerable (8)
- 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 (36)
-
Net
:: HTTPHeader (72) -
RDoc
:: Text (12) - SingleForwardable (24)
- TSort (81)
キーワード
- % (12)
-
add
_ attributes (12) -
add
_ class _ or _ module (24) -
add
_ element (12) -
add
_ specs (12) -
cache
_ data (12) -
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) - config (12)
-
create
_ extension (12) -
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 (48)
-
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - encode (36)
- entities (12)
- fetch (84)
-
fetch
_ path (12) - filter! (14)
-
find
_ gems (12) -
form
_ data= (12) - gsub (12)
- gsub! (12)
-
hash
_ old (12) - header (36)
- include? (12)
- index (7)
- inspect (12)
-
instance
_ delegate (12) - invert (48)
-
is
_ a? (12) -
keep
_ if (24) - key (7)
-
kind
_ of? (12) -
latest
_ cache _ data (12) - length (12)
- merge (24)
- merge! (24)
- modifiable (12)
-
named
_ captures (24) - owner (12)
-
primitive
_ convert (48) - read (24)
-
read
_ all (24) -
read
_ cache _ data (12) - rehash (6)
- reject (48)
- reject! (24)
- replace (48)
-
reset
_ cache _ for (12) - result (8)
-
ruby2
_ keywords (18) - select (12)
- select! (24)
-
set
_ cache _ data (12) -
set
_ form _ data (12) -
show
_ hash (12) -
single
_ delegate (12) - size (12)
- slice (8)
-
spec
_ predecessors (12) - starttls (24)
-
strip
_ hashes (12) -
strongly
_ connected _ components (12) - sub (12)
- sub! (12)
- take (24)
- tally (8)
-
to
_ h (6) -
to
_ hash (48) -
to
_ json (168) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ s (12) -
transform
_ keys (12) -
transform
_ keys! (12) -
try
_ do (24) -
tsort
_ each (23) -
type
_ params (12) - union (7)
-
unmatched
_ alias _ lists (12) -
unmatched
_ alias _ lists= (12) - update (48)
- value (12)
-
with
_ defaults (12) - write (24)
- xsystem (12)
検索結果
先頭5件
-
Data
# hash -> Integer (21126.0) -
自身のハッシュ値を整数で返します。 Data#eql? で比較して等しいオブジェクトは同じハッシュ値を返します。
...
Data#eql? で比較して等しいオブジェクトは同じハッシュ値を返します。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
dog1 = Dog.new("Fred", 5)
p dog1.hash # => -3931425561194935428
dog2 = Dog.new("Fred", 5)
p dog2.hash # => -3931425561194935428
dog3 = Dog.new("Fred",......6)
p dog3.hash # => -4469132459285820530
//}
[注意] 本メソッドの記述は Data のサブクラスのインスタンスに対して呼び
出す事を想定しています。Data.define は Data のサブクラスを作成する点に
注意してください。
@see Object#hash... -
Method
# hash -> Integer (21114.0) -
自身のハッシュ値を返します。
...自身のハッシュ値を返します。
//emlist[例][ruby]{
a = method(:==)
b = method(:eql?)
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}... -
UnboundMethod
# hash -> Integer (21114.0) -
自身のハッシュ値を返します。
...自身のハッシュ値を返します。
//emlist[例][ruby]{
a = method(:==).unbind
b = method(:eql?).unbind
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}... -
IPAddr
# hash -> Integer (21108.0) -
ハッシュ値を返します。
...ハッシュ値を返します。
@see Object#hash... -
BigDecimal
# hash -> Integer (21102.0) -
self のハッシュ値を返します。
self のハッシュ値を返します。
符号、小数部、指数部が同じ場合に同じハッシュ値を返します。 -
MatchData
# hash -> Integer (21102.0) -
self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ した位置を元にハッシュ値を計算して返します。
self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ
した位置を元にハッシュ値を計算して返します。 -
Hash
# default -> object | nil (15149.0) -
ハッシュのデフォルト値を返します。
...nil になることに注意してください。この場合、ハッシュのデフォルト値に
ついて調べるには 2 番目の形式か Hash#default_proc を使ってください。
2 番目の形式はハッシュがデフォルト値としてブロックを持つ場合に、
self と......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.defa......ult(:some) #=> nil
p h #=> {}
//}
@see Hash#default=, Hash#default_proc... -
Hash
# default(key) -> object | nil (15149.0) -
ハッシュのデフォルト値を返します。
...nil になることに注意してください。この場合、ハッシュのデフォルト値に
ついて調べるには 2 番目の形式か Hash#default_proc を使ってください。
2 番目の形式はハッシュがデフォルト値としてブロックを持つ場合に、
self と......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.defa......ult(:some) #=> nil
p h #=> {}
//}
@see Hash#default=, Hash#default_proc... -
Hash
# default _ proc=(pr) (15143.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを 変更します。
...のデフォルトは値(Hash#default)の場合も
Proc の場合(Hash#default_proc)でも上書きされます。
引数には to_proc で Proc オブジェクトに変換できる
オブジェクトも受け付けます。
nil を指定した場合は現在の Hash#default_proc をクリアし......h.default_proc = proc do |hash, key|
hash[key] = case
when (key % 15).zero?
"FizzBuzz"
when (key % 5).zero?
"Buzz"
when (key % 3).zero?
"Fizz"
else
key
end
end
p......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 (15131.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを返します。 ハッシュがブロック形式のデフォルト値を持たない場合 nil を返します。
...][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...