Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/object_thru.rb
Instance Method Summary collapse
Instance Method Details
#thru(callable = nil) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/object_thru.rb', line 4 def thru(callable = nil) if callable.respond_to?(:call) callable.call(self) elsif block_given? yield self end end |