class Exrt::Cli::CLI

Public Instance Methods

history() click to toggle source
# File lib/exrt/cli.rb, line 24
def history
  base = options["base"]
  symbols = options["symbols"]
  response = Exrt::Rate.history(
    base: base,
    symbols: symbols,
    start_at: options["start_at"],
    end_at: options["end_at"]
  )
  r = Exrt::Cli::Renderer.new(d: response, t: Exrt::Cli::HISTORY)
  puts r.render
end
latest() click to toggle source
# File lib/exrt/cli.rb, line 13
def latest
  base = options["base"]
  symbols = options["symbols"]
  response = Exrt::Rate.latest(base: base, symbols: symbols)
  r = Exrt::Cli::Renderer.new(d: response, t: Exrt::Cli::LATEST)
  puts r.render
end