Module: FormObject::DelegateEverything

Defined in:
lib/form_object.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



90
91
92
93
94
95
96
# File 'lib/form_object.rb', line 90

def method_missing(method, *args, &block)
  if resource.respond_to?(method)
    resource.send(method, *args, &block)
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(method, include_all) ⇒ Boolean

Returns:

  • (Boolean)


98
99
100
# File 'lib/form_object.rb', line 98

def respond_to_missing?(method, include_all)
  resource.respond_to?(method, include_all) || super
end