53件ヒット
[1-53件を表示]
(0.276秒)
種類
- インスタンスメソッド (48)
- 文書 (5)
ライブラリ
- ビルトイン (48)
クラス
- Module (48)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (5) -
public
_ class _ method (24)
検索結果
先頭5件
-
Module
# private _ class _ method(*name) -> self (24228.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
...mes 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
module Foo
def self.foo; end
end
Foo.singleton_class.private_method_defined?(:foo) # => false
Foo.private_class_method(:foo) # => Foo
Foo.singleton_class.private_method_defined?(:foo) # => true
//}... -
Module
# private _ class _ method(names) -> self (24228.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
...mes 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
module Foo
def self.foo; end
end
Foo.singleton_class.private_method_defined?(:foo) # => false
Foo.private_class_method(:foo) # => Foo
Foo.singleton_class.private_method_defined?(:foo) # => true
//}... -
Module
# public _ class _ method(*name) -> self (6132.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# public _ class _ method(names) -> self (6132.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
NEWS for Ruby 3
. 0 . 0 (96.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...d in singleton class definitions in methods is now a SyntaxError
instead of a warning. yield in a class definition outside of a method
is now a SyntaxError instead of a LocalJumpError. 15575
* When a class variable is overtaken by the same definition in an
ancestor class/module, a Run......timeError is now raised (previously,
it only issued a warning in verbose mode). Additionally, accessing a
class variable from the toplevel scope is now a RuntimeError.
14541
* Assigning to a numbered parameter is now a SyntaxError instead of
a warning.
== Command line options
==......e arguments were included in the receiver before the other modules and classes included or prepended the receiver. 9573
* Module#public, Module#protected, Module#private, Module#public_class_method, Module#private_class_method, toplevel "private" and "public" methods now accept single array argu...