Module: Request::Builder::ValueWithContext
- Included in:
- RequestConfig
- Defined in:
- lib/request/builder/value_with_context.rb
Instance Method Summary collapse
Instance Method Details
#value_with_context(obj) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/request/builder/value_with_context.rb', line 4 def value_with_context(obj) return obj unless obj.is_a?(Proc) case obj.arity when 1, -1, -2 then instance_exec(self, &obj) else instance_exec(&obj) end end |