Module: WithObject
- Defined in:
- lib/with_object.rb,
lib/with_object/version.rb
Defined Under Namespace
Classes: WithContext
Constant Summary collapse
- VERSION =
'0.0.1'
Instance Method Summary collapse
Instance Method Details
#with(object, &block) ⇒ Object
5 6 7 8 9 |
# File 'lib/with_object.rb', line 5 def with(object, &block) context = WithContext.new(object) context.instance_eval(&block) object end |