るりまサーチ

最速Rubyリファレンスマニュアル検索!
275件ヒット [1-100件を表示] (0.047秒)
トップページ > クエリ:nil[x] > 種類:クラス[x]

別のキーワード

  1. _builtin nil?
  2. object nil?
  3. nilclass nil?
  4. object nil
  5. _builtin nil

キーワード

検索結果

<< 1 2 3 > >>

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 オブジェクトとともに偽を表し、
その他の全てのオブジェクトは真です。...
<< 1 2 3 > >>