Class: Engineyard::Local::Command::List
- Inherits:
-
Base
- Object
- Vagrant::Command::Base
- Base
- Engineyard::Local::Command::List
- Defined in:
- lib/engineyard-local/command/list.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from Vagrant::Command::Base
Methods included from Helpers
#insert_linebreaks, #merge_run_options, #run
Constructor Details
This class inherits a constructor from Engineyard::Local::Command::Base
Instance Method Details
#exec(options) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/engineyard-local/command/list.rb', line 5 def exec() Virtualbox.uuid_map.each do |name, uuid| project_root = Virtualbox.extra_data(uuid, Local.config[:managed_vm_key]) if project_root # move the uuid and project root to the front of the output # for easier cutting since it's less likely to have spaces env.ui.info format(uuid, project_root, name), :prefix => false end end end |
#format(uuid, project_root, name) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/engineyard-local/command/list.rb', line 17 def format(uuid, project_root, name) result = "#{uuid} #{project_root}" if [:format] == "full" "#{result} #{name}" else result end end |