Class: Capricorn::CLI::Machines
- Inherits:
-
Capricorn::CLI
- Object
- Thor
- Capricorn::CLI
- Capricorn::CLI::Machines
- Includes:
- Helpers
- Defined in:
- lib/capricorn-client/cli/machines.rb
Constant Summary
Constants included from Helpers
Instance Method Summary collapse
Methods included from Helpers
#application, #application_ids, #application_info, #applications, #client, #cluster, #config, #environment, #halt, #info, #local_config, #machine, #machines, #node, #nodes
Methods inherited from Capricorn::CLI
banner, #help, #method_missing, start
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Capricorn::CLI
Instance Method Details
#list ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/capricorn-client/cli/machines.rb', line 7 def list machines.sort! do |a, b| a <=> b end puts "Machines:" machines.each do |machine| puts "- #{machine}" end end |
#reboot ⇒ Object
20 21 22 |
# File 'lib/capricorn-client/cli/machines.rb', line 20 def reboot puts client.call.runtime.reboot(node.to_sym) end |
#selfupdate ⇒ Object
26 27 28 |
# File 'lib/capricorn-client/cli/machines.rb', line 26 def selfupdate puts client.call.runtime.selfupdate(node.to_sym) end |