Class: Heroku::Kensa::IOScreen

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#outputObject

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_sObject



34
35
36
# File 'lib/heroku/kensa/screen.rb', line 34

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