Class: RubyDep::Logger

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

Instance Method Summary collapse

Constructor Details

#initialize(device, prefix) ⇒ Logger

Returns a new instance of Logger.



3
4
5
6
# File 'lib/ruby_dep/logger.rb', line 3

def initialize(device, prefix)
  @device = device
  @prefix = prefix
end

Instance Method Details

#notice(msg) ⇒ Object



12
13
14
# File 'lib/ruby_dep/logger.rb', line 12

def notice(msg)
  @device.puts @prefix + msg
end

#warning(msg) ⇒ Object



8
9
10
# File 'lib/ruby_dep/logger.rb', line 8

def warning(msg)
  @device.puts @prefix + msg
end