Sha256: db388b096ca7bdd1717ba81cf4fca0c183c7b92c578702441688cb1023f1d5bf
Contents?: true
Size: 424 Bytes
Versions: 3
Compression:
Stored size: 424 Bytes
Contents
require 'json' module TrelloCli module Formatters class Base def initialize(data) @data = data end def output(format) case format when "json" self.to_json when "tsv" self.to_tsv else self.to_legacy end end def to_json data.to_json end private attr_reader :data end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
trello_cli-0.5.0 | lib/trello_cli/formatters/base.rb |
trello_cli-0.4.1 | lib/trello_cli/formatters/base.rb |
trello_cli-0.4.0 | lib/trello_cli/formatters/base.rb |