Class: Elasticity::BootstrapAction

Inherits:
Object
  • Object
show all
Defined in:
lib/elasticity/bootstrap_action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(script, option, value) ⇒ BootstrapAction

Returns a new instance of BootstrapAction.



10
11
12
13
14
15
# File 'lib/elasticity/bootstrap_action.rb', line 10

def initialize(script, option, value)
  @name = 'Elasticity Bootstrap Action'
  @option = option
  @value = value
  @script = script
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/elasticity/bootstrap_action.rb', line 5

def name
  @name
end

#optionObject

Returns the value of attribute option.



6
7
8
# File 'lib/elasticity/bootstrap_action.rb', line 6

def option
  @option
end

#scriptObject

Returns the value of attribute script.



8
9
10
# File 'lib/elasticity/bootstrap_action.rb', line 8

def script
  @script
end

#valueObject

Returns the value of attribute value.



7
8
9
# File 'lib/elasticity/bootstrap_action.rb', line 7

def value
  @value
end

Instance Method Details

#to_aws_bootstrap_actionObject



17
18
19
20
21
22
23
24
25
# File 'lib/elasticity/bootstrap_action.rb', line 17

def to_aws_bootstrap_action
  {
    :name => @name,
    :script_bootstrap_action => {
      :path => @script,
      :args => [@option, @value]
    }
  }
end