1863件ヒット
  
    
      [201-300件を表示]
    
  
    (0.620秒)
  
  
    トップページ >  :Object#method
:Object#method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :lambda
:lambda![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :BasicObject
:BasicObject![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :coverage
:coverage![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :method_missing
:method_missing![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :public_method
:public_method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :dispid
:dispid![条件を削除 [x]](/images/drop-condition-icon.png) 
  
 :Object#method
:Object#method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :lambda
:lambda![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :BasicObject
:BasicObject![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :coverage
:coverage![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :method_missing
:method_missing![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :public_method
:public_method![条件を削除 [x]](/images/drop-condition-icon.png) >
 >  :dispid
:dispid![条件を削除 [x]](/images/drop-condition-icon.png) 
  種類
ライブラリ
- ビルトイン (916)
- delegate (48)
- drb (12)
- erb (12)
- 
        irb/ output-method (36) 
- json (84)
- 
        minitest/ spec (1) 
- 
        minitest/ unit (1) 
- objspace (12)
- profiler (6)
- psych (8)
- 
        rdoc/ code _ object (12) 
- singleton (12)
- weakref (12)
- win32ole (384)
クラス
- Array (10)
- BasicObject (72)
- Delegator (48)
- ERB (12)
- Enumerator (48)
- 
        Enumerator:: Lazy (48) 
- 
        IRB:: OutputMethod (36) 
- 
        JSON:: State (24) 
- Method (92)
- Module (152)
- NameError (24)
- NoMethodError (12)
- Object (217)
- Proc (12)
- 
        RDoc:: CodeObject (12) 
- Regexp (24)
- Thread (12)
- TracePoint (7)
- UnboundMethod (24)
- WIN32OLE (36)
- 
        WIN32OLE_ METHOD (216) 
- 
        WIN32OLE_ PARAM (84) 
- 
        WIN32OLE_ TYPE (24) 
モジュール
- 
        JSON:: Generator :: GeneratorMethods :: Object (12) 
- 
        JSON:: Generator :: GeneratorMethods :: String (24) 
- Kernel (63)
- Marshal (24)
- 
        MiniTest:: Assertions (1) 
- ObjectSpace (12)
オブジェクト
- main (24)
キーワード
- 
        1. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) 
- === (8)
- DRbObject (12)
- Method (12)
- 
        NEWS for Ruby 2. 0 . 0 (12) 
- 
        NEWS for Ruby 2. 1 . 0 (12) 
- 
        NEWS for Ruby 2. 2 . 0 (11) 
- 
        NEWS for Ruby 2. 3 . 0 (10) 
- 
        NEWS for Ruby 2. 5 . 0 (8) 
- 
        NEWS for Ruby 2. 6 . 0 (7) 
- 
        NEWS for Ruby 2. 7 . 0 (6) 
- 
        NEWS for Ruby 3. 0 . 0 (5) 
- NameError (12)
- NoMethodError (12)
- Object (24)
- 
        Profiler_ _ (6) 
- Ruby プログラムの実行 (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- Singleton (12)
- 
        WIN32OLE_ PARAM (12) 
- 
        WIN32OLE_ VARIABLE (12) 
- WeakRef (12)
- [] (36)
- 
        _ getproperty (12) 
- 
        _ invoke (12) 
- args (12)
- 
        assert_ respond _ to (1) 
- 
        bind_ call (12) 
- call (24)
- 
        class_ exec (12) 
- 
        count_ nodes (12) 
- debug (12)
- 
        def_ class (12) 
- default (12)
- 
        default_ event _ sources (12) 
- 
        define_ method (24) 
- 
        define_ singleton _ method (24) 
- dig (10)
- dump (24)
- each (48)
- 
        enum_ for (48) 
- eval (24)
- event? (12)
- 
        event_ interface (12) 
- generate (12)
- helpcontext (12)
- helpfile (12)
- input? (12)
- inspect (12)
- 
        instance_ eval (24) 
- 
        instance_ method (12) 
- 
        instance_ methods (12) 
- invkind (12)
- 
        invoke_ kind (12) 
- irb (12)
- 
        irb/ completion (12) 
- main (12)
- match (24)
- method (12)
- methods (24)
- 
        module_ exec (12) 
- 
        must_ respond _ to (1) 
- name (36)
- new (12)
- 
        offset_ vtbl (12) 
- 
        ole_ methods (12) 
- 
        ole_ type (12) 
- 
        ole_ type _ detail (12) 
- optional? (12)
- parameters (43)
- params (12)
- pp (12)
- ppx (12)
- 
        private_ instance _ methods (12) 
- 
        private_ methods (12) 
- proc (14)
- 
        protected_ instance _ methods (12) 
- 
        protected_ methods (24) 
- 
        psych_ yaml _ as (4) 
- public (48)
- 
        public_ instance _ method (12) 
- 
        public_ instance _ methods (12) 
- 
        public_ methods (24) 
- puts (12)
- 
        rb_ obj _ methods (12) 
- 
        rb_ obj _ private _ methods (12) 
- 
        rb_ obj _ protected _ methods (12) 
- 
        rb_ obj _ singleton _ methods (12) 
- rdoc (12)
- receiver (12)
- 
        remove_ methods _ etc (12) 
- 
        require_ relative (12) 
- 
        respond_ to? (12) 
- 
        respond_ to _ missing? (12) 
- 
        return_ type (12) 
- 
        return_ type _ detail (12) 
- 
        return_ vtype (12) 
- 
        ruby 1. 6 feature (12) 
- 
        ruby 1. 8 . 2 feature (12) 
- 
        ruby 1. 8 . 3 feature (12) 
- 
        ruby 1. 8 . 4 feature (12) 
- 
        ruby 1. 9 feature (12) 
- send (24)
- 
        singleton_ method (12) 
- 
        singleton_ method _ added (12) 
- 
        singleton_ method _ removed (12) 
- 
        singleton_ method _ undefined (12) 
- 
        singleton_ methods (12) 
- 
        size_ opt _ params (12) 
- 
        size_ params (12) 
- 
        to_ enum (48) 
- 
        to_ json (12) 
- 
        to_ json _ raw (12) 
- 
        to_ json _ raw _ object (12) 
- 
        to_ s (48) 
- visible? (12)
- 
        yaml_ as (4) 
- クラス/メソッドの定義 (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
検索結果
先頭5件
- 
      Object# respond _ to?(name , include _ all = false) -> bool (21054.0) 
- 
      
      
      オブジェクトがメソッド name を持つとき真を返します。 ...されたメソッドで NotImplementedError が発生する場合は true を返します。
 メソッドが定義されていない場合は、Object#respond_to_missing? を呼
 び出してその結果を返します。
 @param name Symbol または文字列で指定するメソッド名です。......start
 template_method
 finish
 end
 def start
 puts "start"
 end
 def template_method
 raise NotImplementedError.new
 end
 def finish
 puts "finish"
 end
 end
 class ImplTemplateMethod
 include Template
 def template_method
 "implement template_method"
 end
 end
 class......late
 # not implement template_method
 end
 puts ImplTemplateMethod.new.respond_to?(:template_method) # => true
 # NotImplementedError が発生しているが、Rubyによる実装部のため true を返す
 puts NotImplTemplateMethod.new.respond_to?(:template_method) # => true
 # GNU/Linux で実...
- 
      Object# respond _ to _ missing?(symbol , include _ private) -> bool (21052.0) 
- 
      
      
      自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。 ...るメソッドに対し
 BasicObject#method_missing で反応するつもりならば真を返します。
 Object#respond_to? はメソッドが定義されていない場合、
 デフォルトでこのメソッドを呼びだし問合せます。
 BasicObject#method_missing を override した場......e を返します。
 @param symbol メソッド名シンボル
 @param include_private private method も含めたい場合に true が渡されます
 //emlist[例][ruby]{
 class Sample
 def method_missing(name, *args)
 if name =~ /^to_*/
 [name, *args] # => [:to_sample, "sample args1", "sa......end
 end
 def respond_to_missing?(sym, include_private)
 (sym =~ /^to_*/) ? true : super
 end
 end
 s = Sample.new
 s.to_sample("sample args1", "sample args2")
 s.respond_to?(:to_sample) # => true
 s.respond_to?(:sample) # => false
 //}
 @see Object#respond_to?, BasicObject#method_missing...
- 
      JSON:: Ext :: Generator :: GeneratorMethods :: Object (21016.0) 
- 
      
      
      Alias of JSON::Generator::GeneratorMethods::Object ...Alias of JSON::Generator::GeneratorMethods::Object...
- 
      JSON:: Generator :: GeneratorMethods :: Object (21016.0) 
- 
      
      
      Object に JSON で使用するインスタンスメソッドを追加するためのモジュールです。 ...Object に JSON で使用するインスタンスメソッドを追加するためのモジュールです。...
- 
      BasicObject# singleton _ method _ undefined(name) -> object (9272.0) 
- 
      
      
      特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。 ...特異メソッドが Module#undef_method または
 undef により未定義にされた時にインタプリタから呼び出されます。
 通常のメソッドの未定義に対するフックには
 Module#method_undefined を使います。
 @param name 未定義にされたメソッド名......o
 def singleton_method_undefined(name)
 puts "singleton method \"#{name}\" was undefined"
 end
 end
 obj = Foo.new
 def obj.foo
 end
 def obj.bar
 end
 class << obj
 undef_method :foo
 end
 obj.instance_eval {undef bar}
 #=> singleton method "foo" was undefined
 # singleton method "bar" was undefin......ed
 //}
 @see Module#method_undefined,BasicObject#singleton_method_added,BasicObject#singleton_method_removed , d:spec/def#undef...
- 
      BasicObject# singleton _ method _ removed(name) -> object (9266.0) 
- 
      
      
      特異メソッドが Module#remove_method に より削除された時にインタプリタから呼び出されます。 ...特異メソッドが Module#remove_method に
 より削除された時にインタプリタから呼び出されます。
 通常のメソッドの削除に対するフックには
 Module#method_removedを使います。
 @param name 削除されたメソッド名が Symbol で渡されます。......leton_method_removed(name)
 puts "singleton method \"#{name}\" was removed"
 end
 end
 obj = Foo.new
 def obj.foo
 end
 class << obj
 remove_method :foo
 end
 #=> singleton method "foo" was removed
 //}
 @see Module#method_removed,BasicObject#singleton_method_added,BasicObject#singleton_method_undef...
- 
      BasicObject# singleton _ method _ added(name) -> object (9244.0) 
- 
      
      
      特異メソッドが追加された時にインタプリタから呼び出されます。 ...Module#method_addedを使います。
 @param name 追加されたメソッド名が Symbol で渡されます。
 //emlist[例][ruby]{
 class Foo
 def singleton_method_added(name)
 puts "singleton method \"#{name}\" was added"
 end
 end
 obj = Foo.new
 def obj.foo
 end
 #=> singleton method "foo"......was added
 //}
 @see Module#method_added,BasicObject#singleton_method_removed,BasicObject#singleton_method_undefined...
- 
      BasicObject# method _ missing(name , *args) -> object (9238.0) 
- 
      
      
      呼びだされたメソッドが定義されていなかった時、Rubyインタプリタがこのメソッド を呼び出します。 ...ルトではこのメソッドは例外 NoMethodError を発生させます。
 @param name 未定義メソッドの名前(シンボル)です。
 @param args 未定義メソッドに渡された引数です。
 @return ユーザー定義の method_missing メソッドの返り値が未定義メ......ドの返り値で
 あるかのように見えます。
 //emlist[例][ruby]{
 class Foo
 def initialize(data)
 @data = data
 end
 def method_missing(name, lang)
 if name.to_s =~ /\Afind_(\d+)_in\z/
 if @data[lang]
 p @data[lang][$1.to_i]
 else
 raise "#{lang} unkno......メソッドを override する場合は対象のメソッド名に対して
 Object#respond_to? が真を返すようにしてください。
 そのためには、Object#respond_to_missing? も同様に override する必
 要があります。
 @see Object#respond_to?, Object#respond_to_missing?...
- 
      Method# inspect -> String (9144.0) 
- 
      
      
      self を読みやすい文字列として返します。 ...します。
 以下の形式の文字列を返します。
 #<Method: klass1(klass2)#method> (形式1)
 klass1 は、Method#inspect では、レシーバのクラス名、
 UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
 元となったクラス/モジュ......モジュール名、
 method は、メソッド名を表します。
 //emlist[例][ruby]{
 module Foo
 def foo
 "foo"
 end
 end
 class Bar
 include Foo
 def bar
 end
 end
 p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo>
 p Bar.new.method(:bar) # => #<Method: Bar#bar>
 //}
 klass......が同じ場合は以下の形式になります。
 #<Method: klass1#method> (形式2)
 特異メソッドに対しては、
 #<Method: obj.method> (形式3)
 #<Method: klass1(klass2).method> (形式4)
 という形式の文字列......します。
 以下の形式の文字列を返します。
 #<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)...
