Class: Rig::Command::Account::List

Inherits:
Rig::Command::Abstract show all
Defined in:
lib/rig/command/account.rb

Instance Method Summary collapse

Methods inherited from Rig::Command::Abstract

#instance_list, #print_table

Instance Method Details

#executeObject



5
6
7
8
9
10
11
12
# File 'lib/rig/command/account.rb', line 5

def execute
  list = Rig::Model::Account.list
  rows = []
  list.each do |n, f|
    rows << [(Rig.config[:default_account] == n.to_s), (Rig.[:name] == n.to_s), n, f]
  end
  print_table(%w{Default Current Name Location}, rows)
end