種類
- インスタンスメソッド (228)
- 特異メソッド (60)
- ライブラリ (36)
- 文書 (31)
クラス
- CSV (12)
-
Gem
:: Command (12) - Hash (84)
-
JSON
:: State (24) - Object (12)
-
RDoc
:: Options (12) - Set (12)
-
URI
:: Generic (36)
モジュール
- Enumerable (24)
- GC (24)
- Kernel (12)
オブジェクト
- ENV (24)
キーワード
- + (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 6 . 0 (7) - configure (12)
-
latest
_ gc _ info (24) - merge! (48)
-
merge
_ libs (12) - rdoc (12)
-
rdoc
/ generator / json _ index (12) -
rdoc
/ markdown (12) - replace (12)
-
ruby 1
. 8 . 4 feature (12) -
slice
_ before (24) - table (12)
-
to
_ hash (12) - update (36)
検索結果
先頭5件
-
URI
:: Generic # +(rel) -> URI :: Generic (31.0) -
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
...').merge('?y') #=> #<URI::HTTP:0xb7ca2e2c URL:http://a/b/c/d;p?y>
URI('http://a/b/c/d;p?q').merge('/./g') #=> #<URI::HTTP:0xb7ca2738 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('/../g') #=> #<URI::HTTP:0xb7ca2008 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('......../../../g') #=> #<URI::HTTP:0xb7ca1888 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../../g') #=> #<URI::HTTP:0xb7ca10a4 URL:http://a/g>... -
NEWS for Ruby 2
. 6 . 0 (12.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...essage が :highlight と :order を受け付けるようになりました。 14324
* Hash
* 変更されたメソッド
* Hash#merge, Hash#merge!, Hash#update が引数を複数受け付けるようになりました。 15111
* Hash#to_h はブロックを受け取りキーと... -
CSV
. table(path , options = Hash . new) -> CSV :: Table | [Array] (6.0) -
以下と同等のことを行うメソッドです。
...t[][ruby]{
CSV.read( path, { headers: true,
converters: :numeric,
header_converters: :symbol }.merge(options) )
//}
@param path ファイル名を指定します。
@param options CSV.new のオプションと同じオプションを指定でき... -
Enumerable
# slice _ before {|elt| bool } -> Enumerator (6.0) -
パターンがマッチした要素、もしくはブロックが真を返した要素から 次にマッチする手前までを チャンク化(グループ化)したものを繰り返す Enumerator を 返します。
..."}, "svn", "proplist", "-R"]) {|f|
f.lines.slice_before(/\AProp/).each {|lines| p lines }
}
#=> ["Properties on '.':\n", " svn:ignore\n", " svk:merge\n"]
# ["Properties on 'goruby.c':\n", " svn:eol-style\n"]
# ["Properties on 'complex.c':\n", " svn:mime-type\n", " svn:eol-style\n"]
# ["... -
Enumerable
# slice _ before(pattern) -> Enumerator (6.0) -
パターンがマッチした要素、もしくはブロックが真を返した要素から 次にマッチする手前までを チャンク化(グループ化)したものを繰り返す Enumerator を 返します。
..."}, "svn", "proplist", "-R"]) {|f|
f.lines.slice_before(/\AProp/).each {|lines| p lines }
}
#=> ["Properties on '.':\n", " svn:ignore\n", " svk:merge\n"]
# ["Properties on 'goruby.c':\n", " svn:eol-style\n"]
# ["Properties on 'complex.c':\n", " svn:mime-type\n", " svn:eol-style\n"]
# ["... -
GC
. latest _ gc _ info(key) -> object (6.0) -
最新のGCの情報を返します。
...//emlist[例][ruby]{
latest = GC.latest_gc_info
latest # => {:major_by=>nil, :gc_by=>:newobj, :have_finalizer=>false, :immediate_sweep=>false, :state=>:sweeping}
stat = GC.stat
merged = GC.latest_gc_info(stat)
merged == latest.merge(stat) # => true
GC.latest_gc_info(:gc_by) # => :newobj
//}... -
GC
. latest _ gc _ info(result _ hash = {}) -> Hash (6.0) -
最新のGCの情報を返します。
...//emlist[例][ruby]{
latest = GC.latest_gc_info
latest # => {:major_by=>nil, :gc_by=>:newobj, :have_finalizer=>false, :immediate_sweep=>false, :state=>:sweeping}
stat = GC.stat
merged = GC.latest_gc_info(stat)
merged == latest.merge(stat) # => true
GC.latest_gc_info(:gc_by) # => :newobj
//}... -
Hash
# replace(other) -> self (6.0) -
ハッシュの内容を other の内容で置き換えます。
...{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... -
Object
# to _ hash -> Hash (6.0) -
オブジェクトの Hash への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...すべての場面で代置可能であるような、
* ハッシュそのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_hash
{'as' => 24}
end
end
it = Foo.new
p({:as => 12}.merge(it)) #=> {"as"=>24, :as=>12}
//}... -
rdoc (6.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
...イル(例えば、README など)を置きたければ、それをコ
マンドラインの最初に置くだけでもかまいません。
: --merge
ri の出力を生成するとき、出力ディレクトリにすでにファイルが存在すれば、
そのファイルを上書きせず...