るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

検索結果

<< < ... 7 8 9 >>

Module#>(other) -> bool | nil (108.0)

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

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

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

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

@raise TypeError other...
...発生します。

@see Module#<

//emlist[例][ruby]{
module
Awesome; end
module
Included
include Awesome
end
module
Prepended
prepend Awesome
end

Included.ancestors # => [Included, Awesome]
Awesome > Included # => true
Included > Awesome # => false

Prepended.ancestors # => [Awesome, Prepend...
...ed]
Awesome > Prepended # => true
Prepended > Awesome # => false

Awesome > Awesome # => false
Awesome > Object # => nil
//}...

Module#>=(other) -> bool | nil (108.0)

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

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

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

@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 >= Bar # => true
Bar >= Foo # => false

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

Foo >= Foo # => true
Foo >= Object # =>...

Module#class_variables(inherit = true) -> [Symbol] (108.0)

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

...param inherit false を指定しない場合はスーパークラスやインクルードして
いるモジュールのクラス変数を含みます。

//emlist[例][ruby]{
class One
@@var1 = 1
end
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
T
wo.class_var...
...iables # => [:@@var2, :@@var1]
T
wo.class_variables(false) # => [:@@var2]
//}

@see Module.constants, Kernel.#local_variables, Kernel.#global_variables, Object#instance_variables, Module#constants...

Module#psych_yaml_as(tag) -> () (108.0)

クラスと tag の間を関連付けます。

...クラスと tag の間を関連付けます。

これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。

この method は deprecated です。 Object.yaml_tag を
かわりに使ってくだ...
...さい。

@param tag 対象のクラスに関連付けるタグの文字列...

Module#public(name) -> String | Symbol (108.0)

メソッドを public に設定します。

...it を参照して下さい。

@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。

@raise NameError 存在しないメソッド名を指定した場合に発生します。

//emlist[例][ruby...
...]{
def foo() 1 end
p foo # => 1
# the toplevel default is private
p self.foo # => private method `foo' called for #<Object:0x401c83b0> (NoMethodError)

def bar() 2 end
public :bar # visibility changed (all access allowed)
p bar # => 2
p self.bar # => 2
//}...

絞り込み条件を変える

Module#remove_class_variable(name) -> object (108.0)

引数で指定したクラス変数を取り除き、そのクラス変数に設定さ れていた値を返します。

...String または Symbol を指定します。

@return 引数で指定されたクラス変数に設定されていた値を返します。

@raise NameError 引数で指定されたクラス変数がそのモジュールやクラスに定義されていない場合に発生します。

//emlist[...
...例][ruby]{
class Foo
@@foo = 1
remove_class_variable(:@@foo) # => 1
p @@foo # => uninitialized class variable @@foo in Foo (NameError)
end
//}

@see Module#remove_const, Object#remove_instance_variable...

Module#yaml_as(tag) -> () (108.0)

クラスと tag の間を関連付けます。

...クラスと tag の間を関連付けます。

これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。

この method は deprecated です。 Object.yaml_tag を
かわりに使ってくだ...
...さい。

@param tag 対象のクラスに関連付けるタグの文字列...

Module#freeze -> self (14.0)

モジュールを凍結(内容の変更を禁止)します。

...

凍結したモジュールにメソッドの追加など何らかの変更を加えようとした場合に
FrozenError
が発生します。

@see Object#freeze

//emlist[例][ruby]{
module
Foo; end
Foo.freeze

module
Foo
def foo; end
end # => FrozenError: can't modify frozen module
//}...
<< < ... 7 8 9 >>