るりまサーチ

最速Rubyリファレンスマニュアル検索!
324件ヒット [301-324件を表示] (0.069秒)

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

検索結果

<< < ... 2 3 4 >>

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

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

...ないクラス同士の比較では
nil を返します。

@
param other 比較対象のモジュールやクラス

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

//emlist[例][ruby]{
module
Foo
end
class Bar
include Foo
end
class Baz < Bar
end
clas...
...s Qux
end
p Bar < Foo # => true
p Baz < Bar # => true
p Baz < Foo # => true
p Baz < Qux # => nil
p Baz > Qux # => nil

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

Module#class_variable_get(name) -> object (32.0)

クラス/モジュールに定義されているクラス変数 name の値を返します。

...name の値を返します。

@
param name String または Symbol を指定します。

@
raise NameError クラス変数 name が定義されていない場合、発生します。

//emlist[例][ruby]{
class Fred
@
@foo = 99
end

def Fred.foo
class_variable_get(:@@foo)
end

p Fred.foo #=> 99
/...
<< < ... 2 3 4 >>