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-1.29.0 lib/bolt/outputter.rb
bolt-1.28.0 lib/bolt/outputter.rb
bolt-1.27.1 lib/bolt/outputter.rb
bolt-1.27.0 lib/bolt/outputter.rb
bolt-1.26.0 lib/bolt/outputter.rb
bolt-1.25.0 lib/bolt/outputter.rb
bolt-1.24.0 lib/bolt/outputter.rb
bolt-1.23.0 lib/bolt/outputter.rb
bolt-1.22.0 lib/bolt/outputter.rb
bolt-1.21.0 lib/bolt/outputter.rb
bolt-1.20.0 lib/bolt/outputter.rb