Module: Representable::Binding::EvaluateOption

Defined in:
lib/representable/binding.rb

Instance Method Summary collapse

Instance Method Details

#evaluate_option(name, input, options) ⇒ Object



47
48
49
50
51
# File 'lib/representable/binding.rb', line 47

def evaluate_option(name, input, options)
  proc = self[name]
  # puts "@@@@@ #{self.inspect}, #{name}...... #{self[name]}"
  proc.(send(:exec_context, options), 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