Class: Inch::Utils::BufferedUI

Inherits:
UI
  • Object
show all
Defined in:
lib/inch/utils/buffered_ui.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from UI

#debug, #edged, #header, #sub, #trace, #use_color?, #warn

Constructor Details

#initialize(_stdout = $stdout, _stderr = $stderr) ⇒ BufferedUI

Returns a new instance of BufferedUI



6
7
8
9
# File 'lib/inch/utils/buffered_ui.rb', line 6

def initialize(_stdout = $stdout, _stderr = $stderr)
  @io = StringIO.new
  super(@io, @io)
end

Instance Attribute Details

#errObject (readonly)

Returns the value of attribute err



4
5
6
# File 'lib/inch/utils/buffered_ui.rb', line 4

def err
  @err
end

#outObject (readonly)

Returns the value of attribute out



4
5
6
# File 'lib/inch/utils/buffered_ui.rb', line 4

def out
  @out
end

Instance Method Details

#bufferObject



11
12
13
# File 'lib/inch/utils/buffered_ui.rb', line 11

def buffer
  @io.string
end