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



43
44
45
46
47
# File 'lib/representable/binding.rb', line 43

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