Class: Kraaken::Logger::LogDevice
- Inherits:
-
Object
- Object
- Kraaken::Logger::LogDevice
- Defined in:
- lib/kraaken/logger/log_device.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(progress_proc) ⇒ LogDevice
constructor
A new instance of LogDevice.
- #write(data) ⇒ Object
Constructor Details
#initialize(progress_proc) ⇒ LogDevice
Returns a new instance of LogDevice.
4 5 6 |
# File 'lib/kraaken/logger/log_device.rb', line 4 def initialize(progress_proc) @progress_proc = progress_proc end |
Instance Method Details
#close ⇒ Object
16 17 |
# File 'lib/kraaken/logger/log_device.rb', line 16 def close end |
#write(data) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/kraaken/logger/log_device.rb', line 8 def write(data) if ( = ) .log(data) else $stdout.write(data) end end |