class BitConverter::CLI

Public Instance Methods

convert(amount, from, to) click to toggle source
# File lib/bit_converter/cli.rb, line 14
def convert(amount, from, to)
  puts BitConverter::Convert.pretty_convert(amount: amount.to_f,
                                            from: from,
                                            to: to)
rescue RuntimeError => e
  puts e.message
end
ping() click to toggle source
# File lib/bit_converter/cli.rb, line 9
def ping
  puts BitConverter::Ping.ping
end
rate(from, to) click to toggle source
# File lib/bit_converter/cli.rb, line 23
def rate(from, to)
  convert(1, from, to)
end