Class: RubyDep::Logger
- Inherits:
-
Object
- Object
- RubyDep::Logger
- Defined in:
- lib/ruby_dep/logger.rb
Instance Method Summary collapse
-
#initialize(device, prefix) ⇒ Logger
constructor
A new instance of Logger.
- #notice(msg) ⇒ Object
- #warning(msg) ⇒ Object
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 |