3件ヒット
[1-3件を表示]
(0.253秒)
検索結果
-
Class
# superclass -> Class | nil (54466.0) -
自身のスーパークラスを返します。
自身のスーパークラスを返します。
//emlist[例][ruby]{
File.superclass #=> IO
IO.superclass #=> Object
class Foo; end
class Bar < Foo; end
Bar.superclass #=> Foo
Object.superclass #=> BasicObject
//}
ただし BasicObject.superclass は nil を返します。
//emlist[例][ruby]{
BasicObject.supercl... -
Ruby用語集 (91.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...ってメソッド呼び出し等に
制限を課していた。
しかし、Ruby 2.7 でこの機構は実質的に無効化されて、
Ruby 3.2 で削除された。
: 鬼雲
: Onigmo
Ruby 2.0 以降採用されている正規表現エンジン。鬼車のフォーク。
参照:spe......に基づき、行える操作に制限を加える仕組み。
しかし、Ruby 2.7 でこの機構は実質的に無効化されて、
Ruby 3.2 で削除された。
: セッター
: setter
オブジェクトのインスタンス変数に値を代入するためのメソッド。
イン... -
Module
# ancestors -> [Class , Module] (37.0) -
クラス、モジュールのスーパークラスとインクルードしているモジュール を優先順位順に配列に格納して返します。
クラス、モジュールのスーパークラスとインクルードしているモジュール
を優先順位順に配列に格納して返します。
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
p ancestors
p included_modules
p superclass
end
# => [Baz, Bar, Foo, Object, Kernel, BasicObject]
# => [Foo, Kernel]
# => Bar
//}
@see Module#included_modules
...