class Rubble::Executor::Local::Output

Attributes

lines[R]
log[R]

Public Class Methods

new(log) click to toggle source
# File lib/rubble/executor/local.rb, line 29
def initialize(log)
    @log = log
    @lines = []
    @flushed = false
end

Public Instance Methods

<<(line) click to toggle source
# File lib/rubble/executor/local.rb, line 34
def <<(line)
    @lines << line
    if @flushed then
        @log.add(line.level, line.text)
    end
end
flush() click to toggle source
# File lib/rubble/executor/local.rb, line 40
def flush
    @lines.each do |line|
        @log.add(line.level, line.text)
    end
    @flushed = true
end