Sha256: b4286b87481b154e19a7317705ac851a668d8c68e05ba7aac6f28c43f2333214

Contents?: true

Size: 252 Bytes

Versions: 5

Compression:

Stored size: 252 Bytes

Contents

require 'yao/cli/formatter/json'
require 'yao/cli/formatter/yaml'

module Yao::Cli
  module Formatter
    def self.formats
      constants.map{|c| c.to_s.downcase}.sort
    end

    def self.get(format)
      const_get(format.upcase)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yao-cli-0.2.3 lib/yao/cli/formatter.rb
yao-cli-0.2.2 lib/yao/cli/formatter.rb
yao-cli-0.2.1 lib/yao/cli/formatter.rb
yao-cli-0.2.0 lib/yao/cli/formatter.rb
yao-cli-0.1.0 lib/yao/cli/formatter.rb