Class: Currentsh::LogOutput
- Inherits:
-
Object
- Object
- Currentsh::LogOutput
- Defined in:
- lib/currentsh/log_output.rb
Instance Method Summary collapse
- #<<(data) ⇒ Object
-
#initialize(io = $stdout) ⇒ LogOutput
constructor
A new instance of LogOutput.
Constructor Details
#initialize(io = $stdout) ⇒ LogOutput
Returns a new instance of LogOutput.
3 4 5 |
# File 'lib/currentsh/log_output.rb', line 3 def initialize(io=$stdout) @io = io end |
Instance Method Details
#<<(data) ⇒ Object
7 8 9 |
# File 'lib/currentsh/log_output.rb', line 7 def <<(data) @io.puts "@current: #{data.to_json}" end |