class Diligent::CLI

Public Instance Methods

legalese() click to toggle source
# File lib/diligent/cli.rb, line 7
def legalese
  puts Diligent::Info.legalese
end
list() click to toggle source
# File lib/diligent/cli.rb, line 14
def list
  list = Diligent::List.new

  case (options[:format] || 'json')
  when 'csv'
    list.as_csv(options[:outfile] || './diligent.csv')
  when 'json'
    puts list.as_json(options[:outfile] || nil)
  when 'html'
    list.as_html(options[:outfile] || './diligent.html')
  else
    raise 'Only CSV, HTML and JSON are currently supported.'
  end
end