richard-viney/ig_markets

View on GitHub
lib/ig_markets/cli/commands/account_command.rb

Summary

Maintainability
A
0 mins
Test Coverage
module IGMarkets
  module CLI
    # Implements the `ig_markets account` command.
    class Main
      desc 'account', 'Prints account overview and balances'

      def account
        self.class.begin_session(options) do |dealing_platform|
          accounts = dealing_platform.account.all

          table = Tables::AccountsTable.new accounts

          puts table
        end
      end
    end
  end
end