Module: Representable::Binding::EvaluateOption

Included in:
Representable::Binding
Defined in:
lib/representable/binding.rb

Instance Method Summary collapse

Instance Method Details

#evaluate_option(name, input, options) ⇒ Object



61
62
63
64
65
# File 'lib/representable/binding.rb', line 61

def evaluate_option(name, input, options)
  proc = self[name]
  # puts "@@@@@ #{self.inspect}, #{name}...... #{self[name]}"
  proc.call(exec_context: send(:exec_context, options), keyword_arguments: options.merge(user_options: options[:options][:user_options], input: input)) # from Uber::Options::Value. # NOTE: this can also be the Proc object if it's not wrapped by Uber:::Value.
end