class HiveQueen::MultiIO
Public Class Methods
new(output = $stderr)
click to toggle source
# File lib/capistrano/hivequeen/multiio.rb, line 7 def initialize(output = $stderr) @memory = StringIO.new @output = output end
Public Instance Methods
history()
click to toggle source
Read the history from memory
# File lib/capistrano/hivequeen/multiio.rb, line 17 def history @memory.rewind @memory.read end
puts(msg)
click to toggle source
# File lib/capistrano/hivequeen/multiio.rb, line 12 def puts(msg) [@memory, @output].each{|t| t.puts(msg)} end
tty?()
click to toggle source
# File lib/capistrano/hivequeen/multiio.rb, line 22 def tty? [@memory, @output].all?(&:tty?) end