exe/capwatch in capwatch-0.1.12 vs exe/capwatch in capwatch-0.1.13
- old
+ new
@@ -2,14 +2,16 @@
require 'capwatch'
include Capwatch
options = CLI.parse(ARGV)
-capwatch_file = File.expand_path('~/.capwatch')
-fund = JSON.parse(File.open(capwatch_file).read)
-loop do
- table = Calculator.fund_hash(fund, CoinMarketCap.fetch)
- system('clear')
- puts Console.draw_table(table)
- sleep options.tick
+if options.telegram
+ Telegram.new(token: options.telegram).start
+else
+ loop do
+ table = Calculator.fund_hash(FundParser.new.fund, CoinMarketCap.fetch)
+ system('clear')
+ puts Console.draw_table(table)
+ sleep options.tick
+ end
end