Class: Xplenty::Kensa::IOScreen
- Inherits:
-
Object
- Object
- Xplenty::Kensa::IOScreen
- Defined in:
- lib/xplenty/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.
27 28 29 |
# File 'lib/xplenty/kensa/screen.rb', line 27 def initialize(io) @output = io end |
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
25 26 27 |
# File 'lib/xplenty/kensa/screen.rb', line 25 def output @output end |
Instance Method Details
#to_s ⇒ Object
31 32 33 |
# File 'lib/xplenty/kensa/screen.rb', line 31 def to_s @output.closed_read? ? '' : @output.tap{|o| o.rewind }.read end |