Module: Kernel
- Defined in:
- lib/hark/core_ext.rb
Instance Method Summary collapse
Instance Method Details
#hark(*args, &block) ⇒ Object
2 3 4 |
# File 'lib/hark/core_ext.rb', line 2 def hark *args, &block Hark.from *args, &block end |
#heed(object, *args, &block) ⇒ Object
6 7 8 9 |
# File 'lib/hark/core_ext.rb', line 6 def heed object, *args, &block listener = (block.arity == 1) ? hark(&block) : block.call object.send *args + [listener] end |