Sha256: b2a0f7077832593bf18c1050b52fd80f992faefe22ec772acaa34d503d5582c1
Contents?: true
Size: 507 Bytes
Versions: 35
Compression:
Stored size: 507 Bytes
Contents
require 'json' require_relative 'renderer/base' require_relative 'renderer/json' require_relative 'renderer/text' module Aptible module CLI module Renderer FORMAT_VAR = 'APTIBLE_OUTPUT_FORMAT'.freeze def self.current case (format = ENV[FORMAT_VAR]) when 'json' Json.new when 'text' Text.new when nil Text.new else raise UserError, "Invalid #{FORMAT_VAR}: #{format}" end end end end end
Version data entries
35 entries across 35 versions & 1 rubygems