Sha256: 4f27795c0fc01926d2d6458da3d664cbf3b16ee006cf38ec4267fe02aff1da19
Contents?: true
Size: 518 Bytes
Versions: 1
Compression:
Stored size: 518 Bytes
Contents
module JYRon module Outputs OUTPUTS_LIST = [:to_rb, :to_json, :to_yaml] CLI_OUTPUTS = {:to_json => {:desc => "JSON Output format"}, :to_yaml => {:desc => "YAML Output format"}, :to_rb => {:desc => "RB/RON (Ruby Object Notation) Output format, use with carefull !"}, } def to_rb res = @object.pretty_inspect return res end def to_json return JSON.pretty_generate(@object).concat("\n") end def to_yaml return @object.to_yaml end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jyron-0.1 | lib/jyron/outputs.rb |