種類
- インスタンスメソッド (77)
- 文書 (71)
- 特異メソッド (33)
- ライブラリ (22)
- オブジェクト (11)
ライブラリ
- ビルトイン (22)
- csv (33)
- getoptlong (55)
- un (11)
クラス
-
ARGF
. class (11) - CSV (33)
- GetoptLong (55)
モジュール
- Kernel (11)
キーワード
- ARGF (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - chmod (11)
-
each
_ option (11) - foreach (11)
- getoptlong (11)
-
inplace
_ mode (11) - optparse (11)
- ordering= (11)
- parse (22)
- quiet= (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11)
検索結果
先頭5件
-
GetoptLong
# each {|optname , optarg| . . . } (18103.0) -
get メソッドのイテレータ版です。オプションとその引数の取得を 繰り返し行います。
get メソッドのイテレータ版です。オプションとその引数の取得を
繰り返し行います。
@see GetoptLong#get -
GetoptLong
# each _ option {|optname , optarg| . . . } (9203.0) -
get メソッドのイテレータ版です。オプションとその引数の取得を 繰り返し行います。
get メソッドのイテレータ版です。オプションとその引数の取得を
繰り返し行います。
@see GetoptLong#get -
CSV
. foreach(path , options = Hash . new) {|row| . . . } -> nil (6200.0) -
このメソッドは CSV ファイルを読むための主要なインターフェイスです。 各行が与えられたブロックに渡されます。
...ファイルを読み込んで UTF-8 な row をブロックに渡します
CSV.foreach("a.csv", encoding: "UTF-32BE:UTF-8"){|row| p row }
//}
@param path CSV ファイルのパスを指定します。
@param options CSV.new のオプションと同じオプションを指定できます。... -
GetoptLong
# set _ options(*arguments) -> self (6124.0) -
あなたのプログラムで、認識させたいオプションをセットします。 個々のオプションは、オプション名と引数のフラグからなる配列でな ければいけません。
...グは、GetoptLong::NO_ARGUMENT,
GetoptLong::REQUIRE_ARGUMENT, GetoptLong::OPTIONAL_ARGUMENT
のいずれかでなくてはなりません。
オプションを設定できるのは、get, get_option, each,
each_option メソッドを呼び出す前だけです。これらのメソッドを
呼び......ョンを表す配列を指定します。
@raise ArgumentError 不正な引数が与えられるた場合、発生します。
parser.set_options(['-d', '--debug', GetoptLong::NO_ARGUMENT],
['--version', GetoptLong::NO_ARGUMENT],
['--help',......NT])
オプション名と引数のフラグの順番に決まりはないので、次のような
形式でも構いません。
parser.set_options([GetoptLong::NO_ARGUMENT, '-d', '--debug'],
[GetoptLong::NO_ARGUMENT, '--version'],
[GetoptLong::NO... -
CSV
. parse(str , options = Hash . new) -> Array (106.0) -
このメソッドは文字列を簡単にパースすることができます。 ブロックを与えた場合は、ブロックにそれぞれの行を渡します。 ブロックを省略した場合は、配列の配列を返します。
...行を渡します。
ブロックを省略した場合は、配列の配列を返します。
@param str 文字列を指定します。
@param options CSV.new のオプションと同じオプションを指定できます。
//emlist[例][ruby]{
require 'csv'
require 'pp'
s = <<EOS
id,first na......> [["id", "first name", "last name", "age"],
# ["1", "taro", "tanaka", "20"],
# ["2", "jiro", "suzuki", "18"]]
CSV.parse(s, headers: true).each do |row|
p [row['first name'], row['age']]
end
# => ["taro", "20"]
# ["jiro", "18"]
//}
//emlist[例][ruby]{
require "csv"
csv = "id|first n... -
CSV
. parse(str , options = Hash . new) {|row| . . . } -> nil (106.0) -
このメソッドは文字列を簡単にパースすることができます。 ブロックを与えた場合は、ブロックにそれぞれの行を渡します。 ブロックを省略した場合は、配列の配列を返します。
...行を渡します。
ブロックを省略した場合は、配列の配列を返します。
@param str 文字列を指定します。
@param options CSV.new のオプションと同じオプションを指定できます。
//emlist[例][ruby]{
require 'csv'
require 'pp'
s = <<EOS
id,first na......> [["id", "first name", "last name", "age"],
# ["1", "taro", "tanaka", "20"],
# ["2", "jiro", "suzuki", "18"]]
CSV.parse(s, headers: true).each do |row|
p [row['first name'], row['age']]
end
# => ["taro", "20"]
# ["jiro", "18"]
//}
//emlist[例][ruby]{
require "csv"
csv = "id|first n... -
NEWS for Ruby 2
. 0 . 0 (66.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ない変数は警告しなくなりました
=== 組み込みクラスの更新
* ARGF.class
* 追加: ARGF.class#codepoints, ARGF.class#each_codepoint
IO にある同名のメソッドに対応します
* Array
* 追加: Array#bsearch 二分探索します
* 非互換:......t{
str.lines.with_index(1) {|line, lineno| ... } # str.lines が配列を返すのでもう動かない
str.each_line.with_index(1) {|line, lineno| ... } # このように each_line に置き換える
//}
* IO#lines, IO#chars, IO#codepoints, IO#bytes, ARGF#lines, ARGF#chars,
ARGF#byte......した。
* Signal.trap
* 上を参照
* Onigmo をマージしました。
https://github.com/k-takata/Onigmo
* The :close_others option is true by default for system() and exec().
Also, the close-on-exec flag is set by default for all new file descriptors.
This means file... -
NEWS for Ruby 3
. 0 . 0 (66.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...and line options
=== `--help` option
When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754
=== `--backtrace-limit` option
The `......--backtrace-limit` option limits the maximum length of a backtrace.
8661
== Core classes updates
Outstanding ones only.
* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_whil......d with Enumerator::ArithmeticSequence
//emlist[][ruby]{
dirty_data = ['--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}
* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE_... -
ruby 1
. 8 . 3 feature (60.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...w]
: FileUtils.chown_R [lib] [new]
: FileUtils.commands [lib] [new]
: FileUtils.options [lib] [new]
: FileUtils.have_option? [lib] [new]
: FileUtils.options_of [lib] [new]
: FileUtils.collect_method [lib] [new]
追加。
: FileUtils.rm_r [......b] [new]
追加。
: Net::HTTPHeader#each_capitalized [lib] [compat]
: Net::HTTPHeader#each_capitalized_name [lib] [new]
Net::HTTPHeader#canonical_each は Net::HTTPHeader#each_capitalized
に名前が変わりました。canonical_each も each_capitalized の別名とし
て提供......されます。
: net/http [lib] [new]
WebDAV のメソッドをサポートするようになりました。
PROPPATCH, LOCK, UNLOCK, OPTIONS, PROPFIND, DELETE, MOVE, COPY, MKCOL。
: Net::HTTPRequest#body_exist? [lib] [obsolete]
: Net::HTTPResponse#response [lib] [obsolete]
: Net::HTT... -
ruby 1
. 6 feature (54.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...べきです。((<ruby-dev:17193>))
ruby '-*' -v
=> ruby 1.6.7 (2002-03-01) [i586-linux]
=> ruby: invalid option -* (-h will show valid options)
: 2002-05-22 parsedate
バージョンアップ((<ruby-dev:17171>))
: 2002-05-22 -T オプション
ruby のコマンド......2002-03-10 メソッドの戻り値
以下のメソッドの戻り値が正しくなりました。((<ruby-bugs-ja:PR#205>))
* ((<Enumerable/each_with_index>)) が self を返すようになった(以前は nil)
* ((<Process/Process.setpgrp>)) が返す値が不定だった。
* ((<String......返すようになった(以前は false)
* IO#close がクローズ済みな IO に対して IOError を起こすようになった。
* IO#each_byte が self を返すようになった(以前は nil)
: rb_define_module_under()
C 関数 rb_define_module_under() でモジュールを定...