Class: TP2::Logger
- Inherits:
-
Object
- Object
- TP2::Logger
- Defined in:
- lib/tp2/logger.rb
Instance Method Summary collapse
- #error(o) ⇒ Object
- #info(o) ⇒ Object
-
#initialize(machine, fd = $stdout.fileno, **opts) ⇒ Logger
constructor
A new instance of Logger.
- #warn(o) ⇒ Object
Constructor Details
#initialize(machine, fd = $stdout.fileno, **opts) ⇒ Logger
Returns a new instance of Logger.
7 8 9 10 11 |
# File 'lib/tp2/logger.rb', line 7 def initialize(machine, fd = $stdout.fileno, **opts) @machine = machine @fd = fd @opts = opts end |
Instance Method Details
#error(o) ⇒ Object
21 22 23 |
# File 'lib/tp2/logger.rb', line 21 def error(o) call(:ERROR, o) end |
#info(o) ⇒ Object
13 14 15 |
# File 'lib/tp2/logger.rb', line 13 def info(o) call(:INFO, o) end |
#warn(o) ⇒ Object
17 18 19 |
# File 'lib/tp2/logger.rb', line 17 def warn(o) call(:WARN, o) end |