Class: PF::BoxAccountCommand
- Inherits:
-
CommandBase
- Object
- Thor
- CommandBase
- PF::BoxAccountCommand
- Defined in:
- lib/pf/cli/box_account.rb
Constant Summary collapse
- @@myself =
"account"
Instance Method Summary collapse
Methods inherited from CommandBase
Instance Method Details
#add(name, client_id, client_secret) ⇒ Object
13 14 15 |
# File 'lib/pf/cli/box_account.rb', line 13 def add(name, client_id, client_secret) BoxAction.add_account(name, client_id, client_secret) end |
#list ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/pf/cli/box_account.rb', line 20 def list() box = Profile.box default_account = box.default_account puts "box accounts(#{box.accounts.size}):" puts box.accounts.each do |account| if account.name == default_account print " * " else print " " end puts account.name end end |
#rm(account_name) ⇒ Object
36 37 38 |
# File 'lib/pf/cli/box_account.rb', line 36 def rm(account_name) BoxAction.remove_account(account_name) end |