Module: WeighflowCli::Rendering

Included in:
Cli, CliWeights
Defined in:
lib/weighflow_cli/rendering.rb

Instance Method Summary collapse

Instance Method Details

#options_renderer(result, options = {}) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/weighflow_cli/rendering.rb', line 3

def options_renderer(result, options = {})
  if options[:yaml]
    puts result.to_yaml
  else
    puts JSON.pretty_generate(result)
  end
end