Class: RSpecSystem::Log::Logger
- Inherits:
-
Object
- Object
- RSpecSystem::Log::Logger
- Defined in:
- lib/rspec-system/log.rb
Instance Attribute Summary collapse
-
#io ⇒ Object
Returns the value of attribute io.
Instance Method Summary collapse
- #debug(text) ⇒ Object
- #error(text) ⇒ Object
- #fatal(text) ⇒ Object
- #info(text) ⇒ Object
-
#initialize(io) ⇒ Logger
constructor
A new instance of Logger.
- #unknown(text) ⇒ Object
- #warn(text) ⇒ Object
Constructor Details
#initialize(io) ⇒ Logger
Returns a new instance of Logger.
8 9 10 |
# File 'lib/rspec-system/log.rb', line 8 def initialize(io) @io = io end |
Instance Attribute Details
#io ⇒ Object
Returns the value of attribute io.
6 7 8 |
# File 'lib/rspec-system/log.rb', line 6 def io @io end |
Instance Method Details
#debug(text) ⇒ Object
12 13 14 |
# File 'lib/rspec-system/log.rb', line 12 def debug(text) io << bold(color('Debug: ', :blue)) << text << "\n" end |
#error(text) ⇒ Object
32 33 34 |
# File 'lib/rspec-system/log.rb', line 32 def error(text) io << 'Error: ' << text << "\n" end |
#fatal(text) ⇒ Object
24 25 26 |
# File 'lib/rspec-system/log.rb', line 24 def fatal(text) io << 'Fatal: ' << text << "\n" end |
#info(text) ⇒ Object
16 17 18 |
# File 'lib/rspec-system/log.rb', line 16 def info(text) io << bold('Info: ') << text << "\n" end |
#unknown(text) ⇒ Object
28 29 30 |
# File 'lib/rspec-system/log.rb', line 28 def unknown(text) io << 'Unknown: ' << text << "\n" end |
#warn(text) ⇒ Object
20 21 22 |
# File 'lib/rspec-system/log.rb', line 20 def warn(text) io << 'Warn: ' << text << "\n" end |