るりまサーチ

最速Rubyリファレンスマニュアル検索!
231件ヒット [1-100件を表示] (0.186秒)
トップページ > クエリ:i[x] > クエリ:l[x] > クエリ:NIL[x] > クエリ:Raise[x] > クエリ:<[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. $-l _builtin

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Module#<(other) -> bool | nil (21561.0)

比較演算子。self が other の子孫である場合、 true を返します。 self が other の先祖か同一のクラス/モジュールである場合、false を返します。

...比較演算子。self が other の子孫である場合、 true を返します。
self が other の先祖か同一のクラス/モジュールである場合、false を返します。

継承関係にないクラス同士の比較では
nil
を返します。

@param other 比較対象のモ...
...@raise TypeError other がクラスやモジュールではない場合に発生します。

//emlist[例][ruby]{
module Foo
end
class Bar
i
nclude Foo
end
class Baz < Bar
end
class Qux
end
p Bar < Foo # => true
p Baz < Bar # => true
p Baz < Foo # => true
p Baz < Qux # => nil
p B...
...az > Qux # => nil

p Foo < Object.new # => in `<': compared with non class/module (TypeError)
//}...

Rake::TaskManager#synthesize_file_task(task_name) -> Rake::FileTask | nil (12425.0)

与えられたタスク名をもとにファイルタスクを合成します。

... nil を返します。

@raise RuntimeError タスクを合成できなかった場合に発生します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app

task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
I
O.write(...
..."sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_file => []>
end
//}...

Module#<=(other) -> bool | nil (9519.0)

比較演算子。self が other の子孫であるか、self と other が 同一クラスである場合、 true を返します。 self が other の先祖である場合、false を返します。

...比較演算子。self が other の子孫であるか、self と other が
同一クラスである場合、 true を返します。
self が other の先祖である場合、false を返します。

継承関係にないクラス同士の比較では
nil
を返します。

@param other 比較...
...ルやクラス

@raise TypeError other がクラスやモジュールではない場合に発生します。

@see Module#<

//emlist[例][ruby]{
module Foo; end
module Bar
i
nclude Foo
end
module Baz
prepend Foo
end

Bar.ancestors # => [Bar, Foo]
Foo <= Bar # => false
Bar <= Foo # => true

Baz....
...ancestors # => [Foo, Baz]
Foo <= Baz # => false
Baz <= Foo # => true

Foo <= Foo # => true
Foo <= Object # => nil
//}...

Kernel.#print(*arg) -> nil (9349.0)

引数を順に標準出力 $stdout に出力します。引数が与えられない時には変数 $_ の値を出力します。

...力します。

変数 $, (出力フィールドセパレータ)に nil
ない値がセットされている時には、各引数の間にその文字列を出力します。
変数 $\ (出力レコードセパレータ)に nil でな
い値がセットされている時には、最後にそれ...
...
@raise IOError 標準出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
print "Hello, world!"
print "Regexp is",/ant/
print nil
print "\n"
#=> Hello, world!Regexp is(?-mix:ant...
...)

$_ = "input"
$, = "<and>"
$\ = "<end>\n"
print
print "AA","BB"
#=> input<end>
#=> AA<and>BB<end>
//}

@see Kernel.#puts,Kernel.#p,IO#print...

Enumerable#min {|a, b| ... } -> object | nil (9331.0)

ブロックの評価結果で各要素の大小判定を行い、最小の要素、もしくは最小の n 要素が昇順で入った配列を返します。 引数を指定しない形式では要素が存在しなければ nil を返します。 引数を指定する形式では、空の配列を返します。

...引数を指定しない形式では要素が存在しなければ nil を返します。
引数を指定する形式では、空の配列を返します。

ブロックの値は、a > b のとき正、a == b のとき 0、
a < b のとき負の整数を、期待しています。

該当する要...
...//emlist[例][ruby]{
class Person
attr_reader :name, :age

def initialize(name, age)
@name = name
@age = age
end
end

people = [
Person.new("sato", 55),
Person.new("sato", 33),
Person.new("sato", 11),
Person.new("suzuki", 55),
Person.new("suzuki", 33),
Person.new("suzuki",...
...age <=> y.age).nonzero? || y.name <=> x.name }
# => #<Person:0x007fd6f0824190 @name="tanaka", @age=11>

people.min(2) { |x, y| (x.age <=> y.age).nonzero? || y.name <=> x.name }
# => [#<Person:0x007fb5899ef4a8 @name="tanaka", @age=11>, #<Person:0x007fb5899ef728 @name="suzuki", @age=11>]
//}

@raise T...

絞り込み条件を変える

Kernel$$ERROR_INFO -> Exception | nil (9313.0)

$! の別名

...$! の別名

require "English"
class SomethingError < StandardError; end

begin
raise
SomethingError
rescue
p $ERROR_INFO.backtrace #=> ["sample.rb:5"]
p $ERROR_INFO.to_s #=> "SomethingError"
end...

Kernel$$ERROR_POSITION -> [String] | nil (9313.0)

$@ の別名

...$@ の別名

require "English"
class SomethingError < StandardError; end

begin
raise
SomethingError
rescue
p $ERROR_POSITION #=> ["sample.rb:5"]
end...

Enumerable#min -> object | nil (9311.0)

最小の要素、もしくは最小の n 要素が昇順で入った配列を返します。 全要素が互いに <=> メソッドで比較できることを仮定しています。

...の n 要素が昇順で入った配列を返します。
全要素が互いに <=> メソッドで比較できることを仮定しています。

引数を指定しない形式では要素が存在しなければ nil を返します。
引数を指定する形式では、空の配列を返しま...
...該当する要素が複数存在する場合、どの要素を返すかは不定です。

@param n 取得する要素数。

//emlist[例][ruby]{
a = %w(albatross dog horse)
a.min # => "albatross"
a.min(2) # => ["albatross", "dog"]
//}...

Enumerable#min(n) {|a, b| ... } -> Array (9131.0)

ブロックの評価結果で各要素の大小判定を行い、最小の要素、もしくは最小の n 要素が昇順で入った配列を返します。 引数を指定しない形式では要素が存在しなければ nil を返します。 引数を指定する形式では、空の配列を返します。

...引数を指定しない形式では要素が存在しなければ nil を返します。
引数を指定する形式では、空の配列を返します。

ブロックの値は、a > b のとき正、a == b のとき 0、
a < b のとき負の整数を、期待しています。

該当する要...
...//emlist[例][ruby]{
class Person
attr_reader :name, :age

def initialize(name, age)
@name = name
@age = age
end
end

people = [
Person.new("sato", 55),
Person.new("sato", 33),
Person.new("sato", 11),
Person.new("suzuki", 55),
Person.new("suzuki", 33),
Person.new("suzuki",...
...age <=> y.age).nonzero? || y.name <=> x.name }
# => #<Person:0x007fd6f0824190 @name="tanaka", @age=11>

people.min(2) { |x, y| (x.age <=> y.age).nonzero? || y.name <=> x.name }
# => [#<Person:0x007fb5899ef4a8 @name="tanaka", @age=11>, #<Person:0x007fb5899ef728 @name="suzuki", @age=11>]
//}

@raise T...

Enumerable#min(n) -> Array (9111.0)

最小の要素、もしくは最小の n 要素が昇順で入った配列を返します。 全要素が互いに <=> メソッドで比較できることを仮定しています。

...の n 要素が昇順で入った配列を返します。
全要素が互いに <=> メソッドで比較できることを仮定しています。

引数を指定しない形式では要素が存在しなければ nil を返します。
引数を指定する形式では、空の配列を返しま...
...該当する要素が複数存在する場合、どの要素を返すかは不定です。

@param n 取得する要素数。

//emlist[例][ruby]{
a = %w(albatross dog horse)
a.min # => "albatross"
a.min(2) # => ["albatross", "dog"]
//}...

絞り込み条件を変える

<< 1 2 3 > >>