Module: Snapshooter::Log
- Included in:
- Base, Storage::Base
- Defined in:
- lib/snapshooter/log.rb
Instance Method Summary collapse
Instance Method Details
#with_log(message, &block) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/snapshooter/log.rb', line 3 def with_log(, &block) t0 = Time.now puts "[START] #{}" result = yield t1 = Time.now puts "[END] #{} (it took #{(t1-t0)/60.0} minutes)" result end |