NoMethodError

NoMethodError

refe

 ==== NoMethodError ====
 ruby 1.7 feature:
 定義されていないメソッドの呼び出しが行われたときに発生します。
 
         self.bar
         => -:1: undefined method `bar' for #<Object:0x401a6c40> (NoMethodError)
 
 メソッド呼び出しの形式でなければ NameError 例外が発生します。
 
         bar
         => -:1: undefined local variable or method `bar' for #<Object:0x401a6c40> (NameError)
 ---- Singleton methods ----
 new
 ---- Instance methods ----
 args
 ---- Singleton methods (inherited) ----
 exception
 ---- Instance methods (inherited) ----
 == === =~ __id__ __send__ _dump _load backtrace class clone
 display dup eql? equal? exception extend freeze frozen?
 hash id initialize initialize_copy inspect instance_eval
 instance_of? instance_variable_get instance_variable_set
 instance_variables is_a? kind_of? marshal_dump marshal_load
 message method method_missing methods name nil? object_id
 pretty_print pretty_print_cycle
 pretty_print_instance_variables private_methods
 protected_methods public_methods remove_instance_variable
 respond_to? send set_backtrace singleton_method_added
 singleton_method_removed singleton_method_undefined
 singleton_methods taint tainted? to_a to_ary to_hash to_int
 to_s to_str type untaint