Top Level Namespace
Defined Under Namespace
Modules: NLHue
Instance Method Summary collapse
Instance Method Details
#bench(label, *args, &block) ⇒ Object
6 7 8 |
# File 'lib/nlhue.rb', line 6 def bench label, *args, &block yield end |
#log(msg) ⇒ Object
13 14 15 |
# File 'lib/nlhue.rb', line 13 def log msg puts msg end |
#log_e(e, msg = nil) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/nlhue.rb', line 20 def log_e e, msg=nil e ||= StandardError.new('No exception given to log') if msg puts "#{msg}: #{e}", e.backtrace else puts e, e.backtrace end end |