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 |
#hearken(method, *args, &block) ⇒ Object
6 7 8 9 |
# File 'lib/hark/core_ext.rb', line 6 def hearken method, *args, &block listener = (block.arity == 1) ? hark(&block) : block.call send method, *args + [listener] end |