Class: Awt::CLI
- Inherits:
-
Object
- Object
- Awt::CLI
- Defined in:
- lib/awt/cli.rb
Instance Attribute Summary collapse
-
#executable ⇒ Object
readonly
Returns the value of attribute executable.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
12 13 14 |
# File 'lib/awt/cli.rb', line 12 def initialize parse_opt end |
Instance Attribute Details
#executable ⇒ Object (readonly)
Returns the value of attribute executable.
10 11 12 |
# File 'lib/awt/cli.rb', line 10 def executable @executable end |
Class Method Details
.start ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/awt/cli.rb', line 24 def start begin cli = self.new cli.execute rescue => e puts e end end |
Instance Method Details
#execute ⇒ Object
16 17 18 19 20 21 |
# File 'lib/awt/cli.rb', line 16 def execute register_targets(@hosts) raise "Awtfile not found." if @task_file.nil? load @task_file $AWT_TASKS[@task_name].exec($AWT_TARGETS) end |