Module: Kernel
- Defined in:
- lib/rumination/utils/with_hash_puts.rb
Instance Method Summary collapse
Instance Method Details
#hash_puts(*args) ⇒ Object
3 4 5 6 |
# File 'lib/rumination/utils/with_hash_puts.rb', line 3 def hash_puts *args print "# " orig_puts *args end |
#with_hash_puts ⇒ Object
8 9 10 11 12 13 |
# File 'lib/rumination/utils/with_hash_puts.rb', line 8 def with_hash_puts Kernel.send :alias_method, :puts, :hash_puts yield ensure Kernel.send :alias_method, :puts, :orig_puts end |