316件ヒット
[301-316件を表示]
(0.017秒)
種類
- インスタンスメソッド (192)
- 文書 (88)
- 関数 (24)
- ライブラリ (12)
ライブラリ
- ビルトイン (192)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Ruby用語集 (12)
-
instance
_ methods (12) -
method
_ defined? (12) - methods (12)
-
private
_ method _ defined? (12) -
protected
_ instance _ methods (12) -
protected
_ method _ defined? (12) -
protected
_ methods (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) -
rb
_ class _ protected _ instance _ methods (12) -
rb
_ mod _ protected (12) - rdoc (12)
-
respond
_ to? (12) -
ruby 1
. 8 . 4 feature (12) -
singleton
_ methods (12) - クラス/メソッドの定義 (12)
検索結果
-
Object
# respond _ to?(name , include _ all = false) -> bool (18.0) -
オブジェクトがメソッド name を持つとき真を返します。
...果を返します。
@param name Symbol または文字列で指定するメソッド名です。
@param include_all private メソッドと protected メソッドを確認の対象に
含めるかを true か false で指定します。省略した場合
は......o if it.respond_to?(:hello)}
#=> Bonjour
list.each{|it| it.instance_eval("puts hello if it.respond_to?(:hello, true)")}
#=> Bonjour
# Guten Tag
module Template
def main
start
template_method
finish
end
def start
puts "start"
end
def template_method
raise NotImplem......生しているが、Rubyによる実装部のため true を返す
puts NotImplTemplateMethod.new.respond_to?(:template_method) # => true
# GNU/Linux で実行。C言語による実装部のため false を返す
puts File.respond_to?(:lchmod) # => false
//}
@see Module#method_defined?... -
Object
# public _ method(name) -> Method (12.0) -
オブジェクトの public メソッド name をオブジェクト化した Method オブジェクトを返します。
...@param name メソッド名を Symbol または String で指定します。
@raise NameError 定義されていないメソッド名や、
protected メソッド名、 private メソッド名を引数として与えると発生します。
//emlist[][ruby]{
1.public_method(:to_int) #=> #<......Method: Integer#to_int>
1.public_method(:p) # method `p' for class `Integer' is private (NameError)
//}
@see Object#method,Object#public_send,Module#public_instance_method...