Class: Bolt::Outputter
- Inherits:
-
Object
show all
- Defined in:
- lib/bolt/outputter.rb,
lib/bolt/outputter/json.rb,
lib/bolt/outputter/human.rb,
lib/bolt/outputter/logger.rb
Defined Under Namespace
Classes: Human, JSON, Logger
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(color, verbose, trace, stream = $stdout) ⇒ Outputter
16
17
18
19
20
21
|
# File 'lib/bolt/outputter.rb', line 16
def initialize(color, verbose, trace, stream = $stdout)
@color = color
@verbose = verbose
@trace = trace
@stream = stream
end
|
Class Method Details
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/bolt/outputter.rb', line 5
def self.for_format(format, color, verbose, trace)
case format
when 'human'
Bolt::Outputter::Human.new(color, verbose, trace)
when 'json'
Bolt::Outputter::JSON.new(color, verbose, trace)
when nil
raise "Cannot use outputter before parsing."
end
end
|