Class: Xplenty::Kensa::IOScreen

Inherits:
Object
  • Object
show all
Defined in:
lib/xplenty/kensa/screen.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#outputObject

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_sObject



31
32
33
# File 'lib/xplenty/kensa/screen.rb', line 31

def to_s
  @output.closed_read? ? '' : @output.tap{|o| o.rewind }.read
end