Module: BrowserShooter::Logger
Instance Attribute Summary collapse
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
- #command_result(command_result) ⇒ Object
- #log(message, force = verbose) ⇒ Object
- #test_result(test_result) ⇒ Object
Instance Attribute Details
#verbose ⇒ Object
Returns the value of attribute verbose.
5 6 7 |
# File 'lib/browser_shooter/logger.rb', line 5 def verbose @verbose end |
Instance Method Details
#command_result(command_result) ⇒ Object
13 14 15 16 |
# File 'lib/browser_shooter/logger.rb', line 13 def command_result( command_result ) Kernel.print "." if command_result[:success] Kernel.print "F" if !command_result[:success] end |
#log(message, force = verbose) ⇒ Object
7 8 9 10 11 |
# File 'lib/browser_shooter/logger.rb', line 7 def log( , force = verbose ) if force Kernel.puts "[BrowserShooter #{Time.now.strftime( "%F %T" )}] #{}" end end |
#test_result(test_result) ⇒ Object
18 19 20 21 |
# File 'lib/browser_shooter/logger.rb', line 18 def test_result( test_result ) Kernel.puts " (success)" if test_result.all? { |e| e[:success] } Kernel.puts " (fail)" if !test_result.all? { |e| e[:success] } end |