Sha256: 36a717876aea7374abd04f8bac7c7cfe8fa1867763c63e3148e360e865bd7ece

Contents?: true

Size: 635 Bytes

Versions: 51

Compression:

Stored size: 635 Bytes

Contents

# frozen_string_literal: true

module Bolt
  class Outputter
    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

    def initialize(color, verbose, trace, stream = $stdout)
      @color = color
      @verbose = verbose
      @trace = trace
      @stream = stream
    end
  end
end

require 'bolt/outputter/human'
require 'bolt/outputter/json'
require 'bolt/outputter/logger'

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
bolt-2.14.0 lib/bolt/outputter.rb
bolt-2.13.0 lib/bolt/outputter.rb
bolt-2.12.0 lib/bolt/outputter.rb
bolt-2.11.1 lib/bolt/outputter.rb
bolt-2.11.0 lib/bolt/outputter.rb
bolt-2.10.0 lib/bolt/outputter.rb
bolt-2.9.0 lib/bolt/outputter.rb
bolt-2.8.0 lib/bolt/outputter.rb
bolt-2.7.0 lib/bolt/outputter.rb
bolt-2.6.0 lib/bolt/outputter.rb
bolt-2.5.0 lib/bolt/outputter.rb
bolt-2.4.0 lib/bolt/outputter.rb
bolt-2.3.1 lib/bolt/outputter.rb
bolt-2.3.0 lib/bolt/outputter.rb
bolt-2.2.0 lib/bolt/outputter.rb
bolt-2.1.0 lib/bolt/outputter.rb
bolt-2.0.1 lib/bolt/outputter.rb
bolt-2.0.0 lib/bolt/outputter.rb
bolt-1.49.0 lib/bolt/outputter.rb
bolt-1.48.0 lib/bolt/outputter.rb