Class: Elevage::CLI
- Inherits:
-
Thor
- Object
- Thor
- Elevage::CLI
- Defined in:
- lib/elevage.rb
Overview
Start of main CLI
Instance Method Summary collapse
-
#list(item) ⇒ Object
Process the ‘list` command.
-
#version ⇒ Object
Display the version.
Instance Method Details
#list(item) ⇒ Object
Process the ‘list` command
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/elevage.rb', line 31 def list(item) # errors handled in class methods if LIST_CMDS.include?(item) puts Elevage::Platform.new.send(item).to_yaml else fail(IOError, ERR[:not_list_cmd]) unless File.file?(ENV_FOLDER + item + '.yml') environment = Elevage::Environment.new(item) puts [:nodes] ? environment.list_nodes : environment end end |
#version ⇒ Object
Display the version
21 22 23 |
# File 'lib/elevage.rb', line 21 def version puts VERSION end |