2179件ヒット
[1-100件を表示]
(0.085秒)
ライブラリ
クラス
- Array (139)
- CSV (12)
-
CSV
:: Row (15) -
CSV
:: Table (36) - Data (12)
- Date (2)
- DateTime (2)
-
Encoding
:: Converter (12) - File (12)
- Float (12)
-
Gem
:: Version (24) - Hash (1116)
- IO (48)
-
JSON
:: State (24) - Logger (24)
- MatchData (14)
- Method (12)
- Object (48)
-
OpenSSL
:: BN (24) - OpenStruct (7)
- OptionParser (120)
-
Psych
:: Visitors :: YAMLTree (12) -
Rake
:: TaskArguments (24) - Random (24)
- Range (12)
- Regexp (12)
- Set (12)
- String (60)
- Struct (37)
-
Thread
:: Queue (12) -
Thread
:: SizedQueue (12) - Time (2)
- UnboundMethod (12)
-
WEBrick
:: HTTPRequest (12) -
Zlib
:: GzipWriter (12)
モジュール
- Enumerable (41)
- FileUtils (12)
-
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 (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
Net
:: HTTPHeader (24) -
OpenURI
:: Meta (12) -
OptionParser
:: Arguable (12)
キーワード
- < (10)
- <= (10)
- == (12)
- === (12)
- > (10)
- >= (10)
- [] (12)
- []= (12)
- abbrev (12)
- assoc (12)
- classify (12)
- clear (12)
- clone (12)
-
close
_ read (12) -
close
_ write (12) - closed? (12)
- compact (9)
- compact! (9)
-
compare
_ by _ identity (12) -
compare
_ by _ identity? (12) -
deconstruct
_ keys (20) - default (24)
- default= (12)
-
default
_ proc (12) -
default
_ proc= (12) - delete (24)
-
delete
_ if (24) - dig (10)
- dup (12)
- each (24)
-
each
_ key (24) -
each
_ pair (24) -
each
_ value (24) - empty? (12)
- eql? (12)
- equal? (12)
- except (4)
- fetch (48)
-
fetch
_ values (20) - filter (14)
- filter! (14)
- finish (24)
- flatten (12)
- flock (12)
- flush (12)
- getopts (36)
-
group
_ by (12) - gsub (12)
- gsub! (12)
-
has
_ key? (12) -
has
_ value? (12) - hash (123)
- include? (12)
- index (7)
- inspect (12)
- invert (12)
-
keep
_ if (24) - key (12)
- key? (12)
- keys (12)
- length (12)
- lshift! (12)
-
marshal
_ dump (36) -
marshal
_ load (36) - member? (12)
- merge (24)
- merge! (24)
-
named
_ captures (12) - on (96)
- push (36)
- query (12)
- rassoc (12)
- rehash (12)
- reject (24)
- reject! (24)
- replace (12)
- rshift! (12)
- select (24)
- select! (24)
-
sev
_ threshold (12) -
sev
_ threshold= (12) - shift (72)
- shuffle (24)
- shuffle! (24)
- size (12)
- slice (8)
- store (12)
- sub (12)
- sub! (12)
- tally (10)
-
to
_ a (12) -
to
_ csv (12) -
to
_ h (101) -
to
_ hash (60) -
to
_ json (108) -
to
_ proc (10) -
to
_ s (24) -
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) -
type
_ params (12) - unshift (12)
- update (24)
- value? (12)
- values (12)
-
values
_ at (12) -
with
_ defaults (12)
検索結果
先頭5件
-
FileUtils
# ruby(*args) {|result , status| . . . } (18136.0) -
与えられた引数で Ruby インタプリタを実行します。
...与えられた引数で Ruby インタプリタを実行します。
@param args Ruby インタプリタに与える引数を指定します。
例:
ruby %{-pe '$_.upcase!' <README}
@see Kernel.#sh... -
Hash
# shift -> [object , object] | nil (9113.0) -
ハッシュからキーが追加された順で先頭の要素をひとつ取り除き、 [key, value]という配列として返します。
...ue]という配列として返します。
shiftは破壊的メソッドです。selfは要素を取り除かれた残りのハッシュに変更されます。
Ruby 3.2以前は、ハッシュが空の場合、デフォルト値(Hash#defaultまたはHash#default_procのブロックの値か、......。
//emlist[例][ruby]{
h = {:ab => "some" , :cd => "all"}
p h.shift #=> [:ab, "some"]
p h.shift #=> [:cd, "all"]
p h #=> {}
p h.shift #=> nil
h1 = Hash.new("default value")
p h1 #=> {}
p h1.shift #=> "d......efault value"
h2 = Hash.new {|*arg| arg}
p h2 #=> {}
p h2.shift #=> [{}, nil]
//}
@see Array#shift... -
Hash
# hash -> Integer (9107.0) -
自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。 自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
...自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。
自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
//emlist[例][ruby]{
a = {}
p a.hash #=> 0
a[1] = :x
p a.hash #=> 329543
//}... -
Hash
# rehash -> self (9107.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
# shift -> [object , object] | nil (9107.0) -
ハッシュからキーが追加された順で先頭の要素をひとつ取り除き、 [key, value]という配列として返します。
...します。
shiftは破壊的メソッドです。selfは要素を取り除かれた残りのハッシュに変更されます。
ハッシュが空の場合、デフォルト値に関わらず nil を返します。
//emlist[例][ruby]{
h = {:ab => "some" , :cd => "all"}
p h.shift......> [:ab, "some"]
p h.shift #=> [:cd, "all"]
p h #=> {}
p h.shift #=> nil
h1 = Hash.new("default value")
p h1 #=> {}
p h1.shift #=> nil
h2 = Hash.new {|*arg| arg}
p h2 #=> {}
p h2.shift #=......> nil
//}
@see Array#shift... -
Hash
# to _ hash -> self (9107.0) -
self を返します。
...self を返します。
//emlist[例][ruby]{
hash = {}
p hash.to_hash # => {}
p hash.to_hash == hash # => true
//}
@see Object#to_hash, Hash#to_h... -
CSV
:: Row # to _ hash -> Hash (6207.0) -
自身をシンプルなハッシュに変換します。
...プルなハッシュに変換します。
フィールドの順序は無視されます。
重複したフィールドは削除されます。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header2", "header1", "header2"], [1, 2, 3])
row.to_hash # => {"header2"=>3, "header1"=>2}
//}... -
Object
# to _ hash -> Hash (6207.0) -
オブジェクトの Hash への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...オブジェクトの Hash への暗黙の変換が必要なときに内部で呼ばれます。
デフォルトでは定義されていません。
説明のためここに記載してありますが、
このメソッドは実際には Object クラスには定義されていません。
必要......すべての場面で代置可能であるような、
* ハッシュそのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_hash
{'as' => 24}
end
end
it = Foo.new
p({:as => 12}.merge(it)) #=> {"as"=>24, :as=>12}
//}... -
Rake
:: TaskArguments # to _ hash -> Hash (6207.0) -
パラメータ名と対応する値を格納したハッシュを返します。
...納したハッシュを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash # => {:name1=>"value1", :name2=>"value2"}
end
//}... -
Object
# hash -> Integer (6137.0) -
オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
...オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。
2つのオブジェクトのハッシュ値が異なるとき、直ち......ql?(B) ならば A.hash == B.hash
の関係が満たされている必要があります。
ただし、ハッシュのキーとして Integer, Symbol, String などの特定の組み込みクラスが使われるときは、組込みのハッシュ関数が使用され、hash メソッドは呼......返します。Ruby 内部の固定長整数 fixnum に収まらない場合は切り捨てられます。
//emlist[][ruby]{
p self.hash #=> 2013505522753096494
p 0.hash #=> 2647535320520409998
p 0.0.hash #=> -2975129765814025835
p nil.hash #=> 2401531420355998067
p "ruby".hash #=> 4460896024...