Class: Proc
Instance Method Summary collapse
-
#in_context(klass_or_obj) ⇒ Object
Changes the context of a proc so that ‘self’ is the klass_or_obj passed.
Instance Method Details
#in_context(klass_or_obj) ⇒ Object
Changes the context of a proc so that ‘self’ is the klass_or_obj passed.
13 14 15 |
# File 'lib/simple_mapper/support/core_ext.rb', line 13 def in_context(klass_or_obj) klass_or_obj.send(:eval, self.to_ruby) end |