Module: ServiceOperation::Params::InstanceMethods

Defined in:
lib/service_operation/params.rb

Overview

InstanceMethods

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object (private)

delegate to context if calling an explicit param



109
110
111
112
113
114
115
116
# File 'lib/service_operation/params.rb', line 109

def method_missing(method_name, *args, &block)
  method_name_without_q = method_name.to_s.delete('?').to_sym
  if attribute_exists?(method_name_without_q)
    context.send(method_name_without_q, *args, &block)
  else
    super
  end
end