るりまサーチ

最速Rubyリファレンスマニュアル検索!
819件ヒット [1-100件を表示] (0.104秒)

別のキーワード

  1. socket ip_options
  2. syslog options
  3. arguable options
  4. optparse options
  5. net/http options

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

FileUtils.options -> Array (18108.0)

オプション名の配列を返します。

...オプション名の配列を返します。

//emlist[][ruby]{
require 'fileutils'
FileUtils.options
# => ["verbose", "mode", "noop", "parents", "force", "preserve", "dereference_root", "remove_destination", "secure", "mtime", "nocreate"]
//}...
...オプション名の配列を返します。

//emlist[][ruby]{
require 'fileutils'
FileUtils.options
# => ["noop", "verbose", "force", "mode", "parents", "owner", "group", "preserve", "dereference_root", "remove_destination", "secure", "mtime", "nocreate"]
//}...

FileUtils.options_of(mid) -> Array (6108.0)

与えられたメソッド名で使用可能なオプション名の配列を返します。

...与えられたメソッド名で使用可能なオプション名の配列を返します。

@param mid メソッド名を指定します。

//emlist[][ruby]{
require 'fileutils'
FileUtils.options_of(:rm) # => ["noop", "verbose", "force"]
//}...

Gem::Command.common_options -> Array (6102.0)

共通の引数を返します。

共通の引数を返します。

JSON::State.from_state(options) -> JSON::State (142.0)

与えられた options によって生成した JSON::State のインスタンスを返します。

...与えられた options によって生成した JSON::State のインスタンスを返します。

@param options JSON::State のインスタンスか、ハッシュを指定します。

@return options がハッシュである場合は、それによって初期化した JSON::State を...
...返します。options が JSON::State のインスタンスである場合は単に
options
を返します。いずれでも無い場合は、何も設定されていない JSON::State の
インスタンスを返します。

//emlist[例 Hash を指定][ruby]{
require "json"

j...

CSV.filter(input, options = Hash.new) {|row| ... } (134.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":in_", ":input_" で始まるキーは input にだけ適用されます。
":out_", ":output_" で始まるキーは output に...
...初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options
= { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,...
...iro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options
= { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row <<...

絞り込み条件を変える

CSV.filter(input, output, options = Hash.new) {|row| ... } (134.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":in_", ":input_" で始まるキーは input にだけ適用されます。
":out_", ":output_" で始まるキーは output に...
...初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options
= { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,...
...iro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options
= { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row <<...

CSV.filter(options = Hash.new) {|row| ... } (134.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...ARGF です。

@param output String か IO のインスタンスを指定します。
デフォルトは $stdout です。

@param options ":in_", ":input_" で始まるキーは input にだけ適用されます。
":out_", ":output_" で始まるキーは output に...
...初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options
= { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,...
...iro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options
= { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row <<...

CSV.instance(data = $stdout, options = Hash.new) -> CSV (127.0)

このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。

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

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

options
= { headers: true }

text =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

csv = CSV.instance(text, options)
c...
...sv2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read

# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}

@see CSV.new...

CSV.instance(data = $stdout, options = Hash.new) {|csv| ... } -> object (127.0)

このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。

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

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

options
= { headers: true }

text =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

csv = CSV.instance(text, options)
c...
...sv2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read

# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}

@see CSV.new...

RubyVM::InstructionSequence.compile_option=(options) (124.0)

命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数 options で指定します。

...命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数
options
で指定します。

@param options コンパイル時の最適化オプションを true、false、nil、
Hash のいずれかで指定します。true を指定した場合は...

絞り込み条件を変える

<< 1 2 3 ... > >>