ライブラリ
- ビルトイン (128)
- continuation (11)
- erb (11)
-
irb
/ context (11) - ostruct (11)
- psych (11)
-
rexml
/ document (33) -
rinda
/ rinda (11) - socket (11)
- strscan (11)
- thread (4)
-
webrick
/ httpauth / basicauth (11) -
webrick
/ httpauth / htpasswd (11)
キーワード
- BasicAuth (11)
- ConditionVariable (11)
- Context (11)
- Continuation (11)
- ERB (11)
- Emitter (11)
- Entity (11)
- Enumerator (11)
- FalseClass (11)
- Fiber (11)
- Hash (11)
- Htpasswd (11)
- IO (11)
- NilClass (11)
- NotationDecl (11)
- OpenStruct (11)
- Proc (11)
- Queue (11)
- Range (11)
- Stat (11)
- String (11)
- StringScanner (11)
- TCPServer (11)
- Template (11)
- XMLDecl (11)
検索結果
-
NilClass (6049.0)
-
nil のクラス。 nil は NilClass クラスの唯一のインスタンスです。 nil は false オブジェクトとともに偽を表し、 その他の全てのオブジェクトは真です。
...nil のクラス。
nil は NilClass クラスの唯一のインスタンスです。
nil は false オブジェクトとともに偽を表し、
その他の全てのオブジェクトは真です。... -
Range (127.0)
-
範囲オブジェクトのクラス。 範囲オブジェクトは文字どおり何らかの意味での範囲を表します。数の範囲はもちろん、 日付の範囲や、「"a" から "z" まで」といった文字列の範囲を表すこともできます。
...らは、終端に nil を与えることで「終端を持たない範囲オブジェクト」
を作ることができるようになりました。
//emlist[終端を持たない範囲オブジェクト][ruby]{
p Range.new(1, nil) # 1 以上(上限無し)を表す
p(1..nil) # 同.......7.0 では始端に nil を与えることで「始端を持たない範囲オブジェクト」
を作ることもできるようになりました。
//emlist[始端を持たない範囲オブジェクト][ruby]{
p Range.new(nil, 5) # 5 以下(下限無し)を表す
p(nil..5) # 同......ない範囲オブジェクト][ruby]{
# 以下はすべて同じ範囲
p Range.new(nil, nil) # => nil..nil
p(nil..nil) # => nil..nil
p(..nil) # => nil..nil
p(nil..) # => nil..nil
//}
範囲式で両端を略した書き方はできません。
p(..) # => Syn... -
Psych
:: Emitter (61.0) -
Psych::Parser でパースし、生じたイベントから YAML ドキュメントを再構築するようなハンドラです。
...(nil, nil, false, Psych::Nodes::Mapping::BLOCK)
emitter.scalar("a", nil, nil, true, false, Psych::Nodes::Scalar::PLAIN)
emitter.scalar("12", nil, nil, true, false, Psych::Nodes::Scalar::PLAIN)
emitter.scalar("xyz", nil, nil, true, false, Psych::Nodes::Scalar::PLAIN)
emitter.scalar("23", nil,... -
REXML
:: Entity (43.0) -
XML における実体(エンティティ、entity)の宣言(declaration)を表わすクラス。
...は 内部実体名なので、external や ref は nil である
p entities["f"].name # => "f"
p entities["f"].value # => "foo bar baz"
p entities["f"].external # => nil
p entities["f"].ref # => nil
# x は 外部実体名なので value が nil で、
# external や ref が文字列を返して......しかし解析対象実体(parsed entity)なので ndata は nil を返す
p entities["x"].name # => "x"
p entities["x"].value # => nil
p entities["x"].external # => "SYSTEM"
p entities["x"].ref # => "x.txt"
p entities["x"].ndata # => nil
# y は解析対象外実体(unparsed entity)なので ndat... -
StringScanner (43.0)
-
StringScanner は文字列スキャナクラスです。 簡単に高速なスキャナを記述できます。
...ngScanner.new('This is an example string')
s.eos? #=> false
p s.scan(/\w+/) #=> "This"
p s.scan(/\w+/) #=> nil
p s.scan(/\s+/) #=> " "
p s.scan(/\s+/) #=> nil
p s.scan(/\w+/) #=> "is"
s.eos? #=> false
p s.scan(/\s+/) #=> " "
p s.scan(/\w+/) #=> "an"
p s.scan(/\s.......scan(/\w+/) #=> "example"
p s.scan(/\s+/) #=> " "
p s.scan(/\w+/) #=> "string"
s.eos? #=> true
p s.scan(/\s+/) #=> nil
p s.scan(/\w+/) #=> nil
//}
StringScanner オブジェクトはスキャンする文字列と「スキャンポインタ」のセットです。
スキャン......string/) #=> nil
p s.scan(/\s+/) #=> " "
p s.scan(/string/) #=> "string"
end
def case2
s = StringScanner.new('test string')
p s.scan_until(/t/) #=> "t"
p s.scan_until(/\w+/) #=> "est"
p s.scan_until(/string/) #=> " string"
p s.scan_until(/\s+/) #=> nil
p s.scan_... -
IO (31.0)
-
基本的な入出力機能のためのクラスです。
...しては、length に nil または 0 を指定した場合、
EOF であっても常に空文字列 "" を返します。
//emlist{
メソッド 空のファイルに対して
IO.read(空ファイル) ""
IO.read(空ファイル, length) nil
IO.readlines(空ファ......既にEOFだったら
IO#each_byte 何もしない
IO#getc nil
IO#gets nil
IO#read() ""
IO#read(length) nil
IO#read_nonblock EOFError
IO#readchar EOFError
IO#read... -
Rinda
:: Template (31.0) -
タプルのマッチングのためのクラスです。 ユーザがこのクラスを直接使うことはありません。
...', nil, nil])
template.match(['abc', 2, 5]) # => true
template.match(['hoge', 2, 5]) # => false
template = Rinda::Template.new([String, Integer, nil])
template.match(['abc', 2, 5]) # => true
template.match(['abcd', 2, 5]) # => true
template = Rinda::Template.new([/^abc/, Integer, nil]......)
template.match([/^abc/, Integer, nil]) # => true
template.match(['abc', 2, 5]) # => true
template.match(['def', 2, 5]) # => false
template = Rinda::Template.new({'name' => String, 'age' => Integer})
template.match({'name' => 'seki', 'age' => 0x20}) # => true
template... -
Range (25.0)
-
範囲オブジェクトのクラス。 範囲オブジェクトは文字どおり何らかの意味での範囲を表します。数の範囲はもちろん、 日付の範囲や、「"a" から "z" まで」といった文字列の範囲を表すこともできます。
...らは、終端に nil を与えることで「終端を持たない範囲オブジェクト」
を作ることができるようになりました。
//emlist[終端を持たない範囲オブジェクト][ruby]{
p Range.new(1, nil) # 1 以上(上限無し)を表す
p(1..nil) # 同......nge#cover? メソッドでの判定には演算子 <=> が使われます。
当然、始端と終端は <=> メソッドで比較可能である(nil 以外を返す)必要が
あります。
範囲オブジェクトのもう一つの基本的機能は繰り返しの範囲を表すことです... -
ERB (19.0)
-
eRuby スクリプトを処理するクラス。
...りです。
* ERb-1.4.x 互換の指定方法
* nil, 0: そのまま変換
* 1: 行末が%>のとき改行を出力しない
* 2: 行頭が<%で行末が%>のとき改行を出力しない
* 2.0 からの指定方法
* nil, "": そのまま変換
* ">": 1と同じ
* "......* "%-": "-"と"%"の両方を行なう
実行例:
# スクリプト
<% 3.times do |n| %>
% n = 0
* <%= n%>
<% end %>
# trim_mode = nil, '', 0
% n = 0
* 0
% n = 0
* 1
% n = 0
* 2
# trim_mode = 1, '>'
% n = 0
* 0% n = 0
* 1% n = 0
* 2
# trim_mod... -
IRB
:: Context (19.0) -
irb の設定を扱うためのクラスです。
...IRB::Context が渡されます。
そのため、サブ irb の設定をまとめて実行するのに使用します。
デフォルト値は nil です。
lib:irb#configure_sub_irb も併せて参照してください。
: IRB.conf[:LC_MESSAGES]
ライブラリ内部で使用します......。
: IRB.conf[:SCRIPT]
ファイル名を指定して irb を実行した場合のパスを文字列で返します。
デフォルト値は nil です。
: IRB.conf[:SINGLE_IRB]
irb 中で self を実行して得られるオブジェクトをサブ irb と共有するかど
うかを......た場合に共有されます。
デフォルト値は false です。
: IRB.conf[:VERSION]
IRB.version を実行した時に返すバージョンを String で指定
します。
デフォルト値は nil です。
: IRB.conf[:__MAIN__]
ライブラリ内部で使用します。... -
FalseClass (17.0)
-
false のクラス。 false は FalseClass クラスの唯一のインスタンスです。 false は nil オブジェクトとともに偽を表し、 その他の全てのオブジェクトは真です。
...false のクラス。
false は FalseClass クラスの唯一のインスタンスです。
false は nil オブジェクトとともに偽を表し、
その他の全てのオブジェクトは真です。...