Class: Object

Inherits:
BasicObject
Defined in:
lib/interrogate/object.rb

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object

If the method name is interrogatory, then try to interrogate the arguments in question. Otherwise, perform the default method missing behavior.



15
16
17
# File 'lib/interrogate/object.rb', line 15

def method_missing(meth, *args, &block)
  Interrogate.is_interrogatory?(meth) ? Interrogate.interrogate(meth, *args, &block) : super
end

Class Method Details

.method_missing(meth, *args, &block) ⇒ Object

If the method name is interrogatory, then try to interrogate the arguments in question. Otherwise, perform the default method missing behavior.



7
8
9
# File 'lib/interrogate/object.rb', line 7

def self.method_missing(meth, *args, &block)
  Interrogate.is_interrogatory?(meth) ? Interrogate.interrogate(meth, *args, &block) : super
end