るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

キーワード

検索結果

OptionParser#separator(sep) -> () (21243.0)

サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。

...サマリには on メソッドを呼んだ順にオプションが表示されるので、区切りを挿入したい
ところでこのメソッドを呼びます。

@param sep サマリの区切りを文字列で指定します。

//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opt...
...s.banner = "Usage: example.rb [options]"

opts.separator ""
opts.separator "Specific options:"

opts.on("-r", "--require LIBRARY") do |lib|
options.library << lib
end

opts.separator ""
opts.separator "Common options:"

opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit...

ruby 1.6 feature (5310.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...on 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) -> stable-snapshot

: 2003-01-...
...> ruby 1.6.7 (2002-03-01) [i586-linux]
Errno::EAGAIN
Errno::EWOULDBLOCK

=> ruby 1.6.8 (2002-12-24) [i586-linux]
Errno::EAGAIN
-
:2: uninitialized constant EWOULDBLOCK at Errno (NameError)

=> ruby 1.6.8 (2003-02-13) [i586-linux]...
...y-talk:43513>))
この場合、$; を分割文字列として使用します。以前までは $; が有効にな
るのは引数省略時だけでした。

$; = ":"
p "a:b:c".split(nil)
=> -:2:in `split': bad separator (ArgumentError)
from -:2
ruby 1.6.7 (2002-0...

正規表現 (750.0)

正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references

...har
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references


正規表現(regular expression)は文字列...
...あります。つまりメタ文字列を構成します。例えば

//emlist[][ruby]{
/[a-z]/
/\Axyz\Z/
//}

という正規表現において "[a-z]", "\A", "\Z"はメタ文字列です。

===[a:expansion] 式展開
正規表現内では、#{式} という形式で式を評価した文字列を...
...Decimal_Number)
* [:alpha:] 英字 (Letter | Mark)
* [:ascii:] ASCIIに含まれる文字 (0000 - 007F)
* [:blank:] スペースとタブ (Space_Separator | 0009)
* [:cntrl:] 制御文字 (Control | Format | Unassigned | Private_Use | Surrogate)
* [:digit:] 数字 (Decimal_Number)
* [:g...

CSV.new(data, options = Hash.new) -> CSV (236.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...ンスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。

@param options CSV をパースするためのオプションをハッシュで指定します。
パフォーマンス上の理由でインスタ...
...If none of those sequences is
found, +data+ is ARGF, Object::STDIN, Object::STDOUT, or
Object::STDERR, or the stream is only available for output, the default
$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
n
ote...
...that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-ending translation can cause
problems with resetting the document position to where it was before the
read ahead. This String will be transcoded into the data's Encoding before parsing.
:...