lib/daylight/resource_proxy.rb
##
# Will attempt to fulfill the method if it exists on the resource or if it
# exists on an Array.  Delegates the method on for subsequent execution.
Will attempt to fulfill the method if it exists on the resource or if it
exists on an Array.  Delegates the method on for subsequent execution.
Will attempt to fulfill the method if it exists on the resource or if it exists on an Array . Delegates the method on for subsequent execution .
def method_missing(method_name, *args, &block)
    if resource_class.respond_to?(method_name)
      self.class.send(:define_method, method_name) do |*method_args, &method_block|
        resource_class.send(method_name, *method_args, &method_block)
      end
      resource_class.send(method_name, *args, &block)
    elsif Array.method_defined?(method_name)
      wrap_array_method(method_name)
      send(method_name, *args, &block)
    else
      super
    end
  end
def method_missing ( method_name , * args , & block ) if resource_class . respond_to? ( method_name ) self . class . send ( :define_method , method_name ) do | * method_args , & method_block | resource_class . send ( method_name , * method_args , & method_block ) end resource_class . send ( method_name , * args , & block ) elsif Array . method_defined? ( method_name ) wrap_array_method ( method_name ) send ( method_name , * args , & block ) else super end end
Will attempt to fulfill the method if it exists on the resource or if it
exists on an Array.
Will attempt to fulfill the method if it exists on the resource or if it exists on an Array .
# resend call to newly wrapped method
method_name
<not_specific>
args
<not_specific>
block
<not_specific>