Class: Elasticity::BootstrapAction
- Inherits:
-
Object
- Object
- Elasticity::BootstrapAction
- Defined in:
- lib/elasticity/bootstrap_action.rb
Direct Known Subclasses
GangliaBootstrapAction, HadoopBootstrapAction, HadoopFileBootstrapAction
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#name ⇒ Object
Returns the value of attribute name.
-
#script ⇒ Object
Returns the value of attribute script.
Instance Method Summary collapse
-
#initialize(script, *bootstrap_arguments) ⇒ BootstrapAction
constructor
A new instance of BootstrapAction.
- #to_aws_bootstrap_action ⇒ Object
Constructor Details
#initialize(script, *bootstrap_arguments) ⇒ BootstrapAction
Returns a new instance of BootstrapAction.
9 10 11 12 13 |
# File 'lib/elasticity/bootstrap_action.rb', line 9 def initialize(script, *bootstrap_arguments) @name = 'Elasticity Bootstrap Action' @script = script @arguments = bootstrap_arguments end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
7 8 9 |
# File 'lib/elasticity/bootstrap_action.rb', line 7 def arguments @arguments end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/elasticity/bootstrap_action.rb', line 5 def name @name end |
#script ⇒ Object
Returns the value of attribute script.
6 7 8 |
# File 'lib/elasticity/bootstrap_action.rb', line 6 def script @script end |
Instance Method Details
#to_aws_bootstrap_action ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/elasticity/bootstrap_action.rb', line 15 def to_aws_bootstrap_action action = { :name => @name, :script_bootstrap_action => { :path => @script } } action[:script_bootstrap_action].merge!(:args => @arguments) unless @arguments.empty? action end |