Class: Machines::Logger
- Inherits:
-
Object
- Object
- Machines::Logger
- Defined in:
- lib/machines/logger.rb
Instance Method Summary (collapse)
- - (Object) flush
-
- (Logger) initialize(to, options = {})
constructor
A new instance of Logger.
-
- (Object) log(message, options = {})
Logs a message.
Constructor Details
- (Logger) initialize(to, options = {})
A new instance of Logger
11 12 13 14 |
# File 'lib/machines/logger.rb', line 11 def initialize to, = {} @to = to @truncate = [:truncate] end |
Instance Method Details
- (Object) flush
27 28 29 |
# File 'lib/machines/logger.rb', line 27 def flush @to.flush end |
- (Object) log(message, options = {})
Logs a message
22 23 24 25 |
# File 'lib/machines/logger.rb', line 22 def log , = {} = (, ) @to.print end |