るりまサーチ

最速Rubyリファレンスマニュアル検索!
154件ヒット [1-100件を表示] (0.142秒)
トップページ > クエリ:I[x] > クエリ:a[x] > クエリ:merge[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

ライブラリ

クラス

モジュール

検索結果

<< 1 2 > >>

JSON::State#merge(options = {}) -> self (21201.0)

与えられたハッシュで自身を設定します。

...ON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

//emlist[例][ruby]{
require "json"

json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "value1", key2: "value2"...
...}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

json_state.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

URI::Generic#merge(rel) -> URI::Generic (18297.0)

自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。

...結した新しい URI オブジェクトを生成して返します。

3986 の Section 5.2 の仕様に従います。
rel が文字列の場合は URI.parse(rel) によって、URI に変換してから連結します。


@param rel 連結したいパスを文字列か URI オブジェクトで...
...require 'uri'
p URI.parse('http://example.com/') + '/foo/bar.html'
#=> #<URI::HTTP:0x201001c0 URL:http://example.com/foo/bar.html>
URI('http://a/b/c/d;p?q').merge('?y') #=> #<URI::HTTP:0xb7ca2e2c URL:http://a/b/c/d;p?y>
URI('http://a/b/c/d;p?q').merge('/./g') #=> #<URI::H...
...a2738 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...

Gem::Command#merge_options(new_options) -> Hash (15401.0)

与えられたオプションとデフォルトのオプションをマージします。 しかし、新しいオプションに同一のキーがあってもデフォルトのオプションは変更されません。

...オプションとデフォルトのオプションをマージします。
しかし、新しいオプションに同一のキーがあってもデフォルトのオプションは変更されません。

@param new_options 新しいコマンドオプションをハッシュで指定します。...

GC.latest_gc_info(key) -> object (12206.0)

最新のGCの情報を返します。

...のGCの情報を返します。

@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。

@param key 得られる情報から特...
...します。

//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
merge
d = GC.latest_gc_info(stat)
merge
d == latest.merge(stat) # => true

GC.latest_gc_info(:gc_by) # => :...

GC.latest_gc_info(result_hash = {}) -> Hash (12206.0)

最新のGCの情報を返します。

...のGCの情報を返します。

@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。

@param key 得られる情報から特...
...します。

//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
merge
d = GC.latest_gc_info(stat)
merge
d == latest.merge(stat) # => true

GC.latest_gc_info(:gc_by) # => :...

絞り込み条件を変える

rdoc/generator/json_index (12066.0)

他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。

...This generator is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.

このジェネレータは HTML ジェネレータと一緒に使うために設計されています。:

class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir...
...Pathname.pwd.expand_path

@json_index = RDoc::Generator::JsonIndex.new self, options
end

def generate
# ...
@json_index.generate
end
end

=== インデックスフォーマット

検索用のインデックスは JSON ファイルに出力されます。search_data...
...9 Vladimir Kolesnikov

Permission is hereby granted, free of charge, to any person obtaining
a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,...

Enumerable#slice_before(pattern) -> Enumerator (9354.0)

パターンがマッチした要素、もしくはブロックが真を返した要素から 次にマッチする手前までを チャンク化(グループ化)したものを繰り返す Enumerator を 返します。

...はブロックが真を返した要素から
次にマッチする手前までを
チャンク化(グループ化)したものを繰り返す Enumerator を
返します。

パターンを渡した場合は各要素に対し === が呼び出され、
それが真になったところをチャン...
...配列として表現されます。

Enumerable#to_a や Enumerable#map のようなメソッドを使うこ
ともできます。

//emlist[例][ruby]{
# 偶数要素をチャンクの先頭と見なす
[0,2,4,1,2,4,5,3,1,4,2].slice_before(&:even?).to_a
# => [[0], [2], [4, 1], [2], [4, 5, 3, 1], [...
....each {|e| pp e}
}

# "svn proplist -R" の結果を分割する
# これは一要素が複数行にまたがっている

I
O.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) {|f|
f.lines.slice_before(/\AProp/).each {|lines| p lines }
}
#=> ["Properties on '.':\n", " svn:ignore\n", " svk:merge\...

Enumerable#slice_before {|elt| bool } -> Enumerator (9254.0)

パターンがマッチした要素、もしくはブロックが真を返した要素から 次にマッチする手前までを チャンク化(グループ化)したものを繰り返す Enumerator を 返します。

...はブロックが真を返した要素から
次にマッチする手前までを
チャンク化(グループ化)したものを繰り返す Enumerator を
返します。

パターンを渡した場合は各要素に対し === が呼び出され、
それが真になったところをチャン...
...配列として表現されます。

Enumerable#to_a や Enumerable#map のようなメソッドを使うこ
ともできます。

//emlist[例][ruby]{
# 偶数要素をチャンクの先頭と見なす
[0,2,4,1,2,4,5,3,1,4,2].slice_before(&:even?).to_a
# => [[0], [2], [4, 1], [2], [4, 5, 3, 1], [...
....each {|e| pp e}
}

# "svn proplist -R" の結果を分割する
# これは一要素が複数行にまたがっている

I
O.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) {|f|
f.lines.slice_before(/\AProp/).each {|lines| p lines }
}
#=> ["Properties on '.':\n", " svn:ignore\n", " svk:merge\...

JSON::State#configure(options = {}) -> self (9101.0)

与えられたハッシュで自身を設定します。

...ON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

//emlist[例][ruby]{
require "json"

json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "value1", key2: "value2"...
...}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

json_state.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

CSV.table(path, options = Hash.new) -> CSV::Table | [Array] (6306.0)

以下と同等のことを行うメソッドです。

...行うメソッドです。

//emlist[][ruby]{
CSV.read( path, { headers: true,
converters: :numeric,
header_converters: :symbol }.merge(options) )
//}

@param path ファイル名を指定します。

@param options CSV.new のオプションと...
...同じオプションを指定できます。


@see CSV.read...

絞り込み条件を変える

<< 1 2 > >>