Class: TP2::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/tp2/logger.rb

Instance Method Summary collapse

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