8件ヒット
  
    
      [1-8件を表示]
    
  
    (0.495秒)
  
  
    トップページ >  :Object#method
:Object#method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :main
:main![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :define_singleton_method
:define_singleton_method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :coverage
:coverage![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :method
:method![条件を削除 [x]](/images/drop-condition-icon.png) > クラス:Method
 > クラス:Method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :3.3
:3.3![条件を削除 [x]](/images/drop-condition-icon.png) 
  
 :Object#method
:Object#method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :main
:main![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :define_singleton_method
:define_singleton_method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :coverage
:coverage![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :method
:method![条件を削除 [x]](/images/drop-condition-icon.png) > クラス:Method
 > クラス:Method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :3.3
:3.3![条件を削除 [x]](/images/drop-condition-icon.png) 
  検索結果
先頭5件
- 
      Method# inspect -> String (27436.0) 
- 
      
      
      self を読みやすい文字列として返します。 ...します。
 以下の形式の文字列を返します。
 #<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
 klass1 は、Method#inspect では、レシーバのクラス名、
 UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
 元となったクラス/モジ......klass2 は、実際にそのメソッドを定義しているクラス/モジュール名、
 method は、メソッド名を表します。
 arg は引数を表します。
 「foo.rb:2」は Method#source_location を表します。
 source_location が nil の場合には付きません。
 //em......def bar(a, b)
 end
 end
 p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
 p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
 //}
 klass1 と klass2 が同じ場合は以下の形式になります。
 #<Method: klass1#method() foo.rb:2> (形式2)...
- 
      Method# to _ s -> String (27436.0) 
- 
      
      
      self を読みやすい文字列として返します。 ...します。
 以下の形式の文字列を返します。
 #<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
 klass1 は、Method#inspect では、レシーバのクラス名、
 UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
 元となったクラス/モジ......klass2 は、実際にそのメソッドを定義しているクラス/モジュール名、
 method は、メソッド名を表します。
 arg は引数を表します。
 「foo.rb:2」は Method#source_location を表します。
 source_location が nil の場合には付きません。
 //em......def bar(a, b)
 end
 end
 p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
 p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
 //}
 klass1 と klass2 が同じ場合は以下の形式になります。
 #<Method: klass1#method() foo.rb:2> (形式2)...
- 
      Method# parameters -> [object] (27427.0) 
- 
      
      
      Method オブジェクトの引数の情報を返します。 ...Method オブジェクトの引数の情報を返します。
 Method オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
 各配列の要素は引数の種類に応じた以下のような Symbol と、仮引数の名......数
 //emlist[例][ruby]{
 m = Class.new{define_method(:m){|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}}.instance_method(:m)
 m.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
 File.method(:symlink).parameters #=> req
 //}
 @see Proc#p...
- 
      Method# ===(*args) -> object (27352.0) 
- 
      
      
      メソッドオブジェクトに封入されているメソッドを起動します。 ...ありません。
 @param args self に渡される引数。
 @see UnboundMethod#bind_call
 //emlist[例][ruby]{
 class Foo
 def foo(arg)
 "foo called with arg #{arg}"
 end
 end
 m = Foo.new.method(:foo) # => #<Method: Foo#foo>
 m[1] # => "foo called with arg 1"
 m.call(2) # => "foo called w...
- 
      Method# [](*args) -> object (27352.0) 
- 
      
      
      メソッドオブジェクトに封入されているメソッドを起動します。 ...ありません。
 @param args self に渡される引数。
 @see UnboundMethod#bind_call
 //emlist[例][ruby]{
 class Foo
 def foo(arg)
 "foo called with arg #{arg}"
 end
 end
 m = Foo.new.method(:foo) # => #<Method: Foo#foo>
 m[1] # => "foo called with arg 1"
 m.call(2) # => "foo called w...
- 
      Method# call(*args) -> object (27352.0) 
- 
      
      
      メソッドオブジェクトに封入されているメソッドを起動します。 ...ありません。
 @param args self に渡される引数。
 @see UnboundMethod#bind_call
 //emlist[例][ruby]{
 class Foo
 def foo(arg)
 "foo called with arg #{arg}"
 end
 end
 m = Foo.new.method(:foo) # => #<Method: Foo#foo>
 m[1] # => "foo called with arg 1"
 m.call(2) # => "foo called w...
- 
      Method# call(*args) { . . . } -> object (27352.0) 
- 
      
      
      メソッドオブジェクトに封入されているメソッドを起動します。 ...ありません。
 @param args self に渡される引数。
 @see UnboundMethod#bind_call
 //emlist[例][ruby]{
 class Foo
 def foo(arg)
 "foo called with arg #{arg}"
 end
 end
 m = Foo.new.method(:foo) # => #<Method: Foo#foo>
 m[1] # => "foo called with arg 1"
 m.call(2) # => "foo called w...
- 
      Method# receiver -> object (27343.0) 
- 
      
      
      このメソッドオブジェクトのレシーバを返します。 ...のメソッドオブジェクトのレシーバを返します。
 //emlist[例][ruby]{
 class Foo
 def foo(arg)
 "foo called with arg #{arg}"
 end
 end
 m = Foo.new.method(:foo) # => #<Method: Foo#foo>
 m.receiver # => #<Foo:0x007fb39203eb78>
 m.receiver.foo(1) # => "foo called with arg 1"
 //}...
