class Gtmtech::Crypto::Subcommands::Reconcile

Public Class Methods

description() click to toggle source
# File lib/gtmtech/crypto/subcommands/reconcile.rb, line 9
def self.description
  "reconcile transactions"
end
execute() click to toggle source
# File lib/gtmtech/crypto/subcommands/reconcile.rb, line 35
def self.execute
  values = {}
  while ARGV.length > 0
    current_valuation = ARGV.shift
    currency = current_valuation.split("=")[0]
    gbp_equiv = current_valuation.split("=")[1]
    values[ currency ] = gbp_equiv
  end
  self.reconcile values
end
options() click to toggle source
# File lib/gtmtech/crypto/subcommands/reconcile.rb, line 26
def self.options
  []
end
reconcile(values) click to toggle source
# File lib/gtmtech/crypto/subcommands/reconcile.rb, line 30
def self.reconcile values
  Data.load
  Data.reconcile_transactions values
end
usage() click to toggle source
# File lib/gtmtech/crypto/subcommands/reconcile.rb, line 13
        def self.usage
          <<-EOS
Usage (crypto #{self.prettyname}) [BTC=<current btc price> ETH=<current eth price> .... etc ...]

crypto #{self.prettyname}
  - reconcile all transactions

If you specify the current price (in GBP) of each coin, the summary will become more illuminating

Options:
EOS
        end