Class: Heroku::Kensa::IOScreen
- Inherits:
-
Object
- Object
- Heroku::Kensa::IOScreen
- Defined in:
- lib/heroku/kensa/screen.rb
Instance Attribute Summary collapse
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(io) ⇒ IOScreen
constructor
A new instance of IOScreen.
- #to_s ⇒ Object
Constructor Details
#initialize(io) ⇒ IOScreen
Returns a new instance of IOScreen.
30 31 32 |
# File 'lib/heroku/kensa/screen.rb', line 30 def initialize(io) @output = io end |
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
28 29 30 |
# File 'lib/heroku/kensa/screen.rb', line 28 def output @output end |
Instance Method Details
#to_s ⇒ Object
34 35 36 |
# File 'lib/heroku/kensa/screen.rb', line 34 def to_s @output.closed_read? ? '' : @output.tap{|o| o.rewind }.read end |