when you write case ARGV[0]
you are totally ignoring the opt_parser...
ARGV[0]
is the first word in the command line. The whole point of opt_parser is that you don't look at ARGV
:
if options[:version]
puts Argosnap::VERSION
elsif options[:config]
Argosnap::Install.new.config
elsif options[:balance]
b = Argosnap::Fetch.new.balance
puts "Current balance (picodollars): #{b}"
else
puts "Type: 'argosnap -h' for help!"
end