Class: Kar::CargoTask::Results
- Inherits:
-
Object
- Object
- Kar::CargoTask::Results
- Defined in:
- lib/kar/cargotask.rb
Instance Method Summary collapse
- #<<(output) ⇒ Object
-
#initialize ⇒ Results
constructor
A new instance of Results.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Results
Returns a new instance of Results.
90 91 92 |
# File 'lib/kar/cargotask.rb', line 90 def initialize @io = verbose? ? $stdout : StringIO.new end |
Instance Method Details
#<<(output) ⇒ Object
94 95 96 97 |
# File 'lib/kar/cargotask.rb', line 94 def <<(output) # Always break a line even when output isn't terminated by a line break @io.puts output end |
#to_s ⇒ Object
99 100 101 102 103 104 105 106 |
# File 'lib/kar/cargotask.rb', line 99 def to_s if verbose? "" else @io.rewind @io.read end end |