Module: Yao::Cli::Formatter

Defined in:
lib/yao/cli/formatter.rb,
lib/yao/cli/formatter/json.rb,
lib/yao/cli/formatter/yaml.rb

Defined Under Namespace

Classes: JSON, YAML

Class Method Summary collapse

Class Method Details

.formatsObject



6
7
8
# File 'lib/yao/cli/formatter.rb', line 6

def self.formats
  constants.map{|c| c.to_s.downcase}.sort
end

.get(format) ⇒ Object



10
11
12
# File 'lib/yao/cli/formatter.rb', line 10

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