Class: Exrt::Cli::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/exrt/cli.rb

Instance Method Summary collapse

Instance Method Details

#historyObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/exrt/cli.rb', line 22

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"]
  )
  puts response
end

#latestObject



12
13
14
15
16
17
# File 'lib/exrt/cli.rb', line 12

def latest
  base = options["base"]
  symbols = options["symbols"]
  response = Exrt::Rate.latest(base: base, symbols: symbols)
  puts response
end