Class: XeroCLI::Commands::Accounts
- Defined in:
- lib/xero_cli/commands/accounts.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Accounts
constructor
A new instance of Accounts.
- #perform ⇒ Object
Methods inherited from Base
#format_date, #money_to_cents, #read_guid, #xero_api
Constructor Details
#initialize(options) ⇒ Accounts
Returns a new instance of Accounts.
2 3 4 |
# File 'lib/xero_cli/commands/accounts.rb', line 2 def initialize() @show_accounts = .show_accounts end |
Instance Method Details
#perform ⇒ Object
6 7 8 9 10 |
# File 'lib/xero_cli/commands/accounts.rb', line 6 def perform accounts = get_account(show_accounts == 'ALL' ? nil : show_accounts) XeroCLI::AccountsStorage.set(accounts.map(&:to_h)) ap accounts end |