66件ヒット
[1-66件を表示]
(0.078秒)
キーワード
- < (11)
- <= (11)
- > (11)
- >= (11)
-
define
_ method (22)
検索結果
先頭5件
-
Module
# <(other) -> bool | nil (8022.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
class 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
# <=(other) -> bool | nil (8016.0) -
比較演算子。self が other の子孫であるか、self と other が 同一クラスである場合、 true を返します。 self が other の先祖である場合、false を返します。
...@param other 比較対象のモジュールやクラス
@raise TypeError other がクラスやモジュールではない場合に発生します。
@see Module#<
//emlist[例][ruby]{
module Foo; end
module Bar
include Foo
end
module Baz
prepend Foo
end
Bar.ancestors # => [Bar, Foo]
Foo <=... -
Module
# >(other) -> bool | nil (8016.0) -
比較演算子。 self が other の先祖である場合、true を返します。 self が other の子孫か同一クラスである場合、false を返します。
...am other 比較対象のモジュールやクラス
@raise TypeError other がクラスやモジュールではない場合に発生します。
@see Module#<
//emlist[例][ruby]{
module Awesome; end
module Included
include Awesome
end
module Prepended
prepend Awesome
end
Included.ancestors... -
Module
# >=(other) -> bool | nil (8016.0) -
比較演算子。self が other の先祖か同一クラスである場合、 true を返します。 self が other の子孫である場合、false を返します。
...@param other 比較対象のモジュールやクラス
@raise TypeError other がクラスやモジュールではない場合に発生します。
@see Module#<
//emlist[例][ruby]{
module Foo; end
module Bar
include Foo
end
module Baz
prepend Foo
end
Bar.ancestors # => [Bar, Foo]
Foo >=... -
Module
# define _ method(name) { . . . } -> Symbol (8016.0) -
インスタンスメソッド name を定義します。
...UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
@raise TypeError method に同じクラス、サブクラス、モジュール以外のメソッ
ドを指定した場合に発生します... -
Module
# define _ method(name , method) -> Symbol (8016.0) -
インスタンスメソッド name を定義します。
...UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
@raise TypeError method に同じクラス、サブクラス、モジュール以外のメソッ
ドを指定した場合に発生します...