Sha256: 76e2f84e07b637977569f74b03b1a973a11246e8353bde3c71a8659d625731dc

Contents?: true

Size: 413 Bytes

Versions: 8

Compression:

Stored size: 413 Bytes

Contents

module Bolt
  class Outputter
    def self.for_format(format)
      case format
      when 'human'
        Bolt::Outputter::Human.new
      when 'json'
        Bolt::Outputter::JSON.new
      when nil
        raise "Cannot use outputter before parsing."
      end
    end

    def initialize(stream = $stdout)
      @stream = stream
    end
  end
end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bolt-0.15.0 lib/bolt/outputter.rb
bolt-0.14.0 lib/bolt/outputter.rb
bolt-0.13.0 lib/bolt/outputter.rb
bolt-0.12.0 lib/bolt/outputter.rb
bolt-0.11.0 lib/bolt/outputter.rb
bolt-0.10.0 lib/bolt/outputter.rb
bolt-0.9.0 lib/bolt/outputter.rb
bolt-0.8.0 lib/bolt/outputter.rb