Class: Ec2Starter::Instance
- Inherits:
-
Object
- Object
- Ec2Starter::Instance
- Defined in:
- lib/ec2-starter/starter.rb
Instance Attribute Summary collapse
-
#ami_id ⇒ Object
Returns the value of attribute ami_id.
-
#commands ⇒ Object
Returns the value of attribute commands.
-
#default_options ⇒ Object
Returns the value of attribute default_options.
-
#instance_id ⇒ Object
Returns the value of attribute instance_id.
-
#ips ⇒ Object
Returns the value of attribute ips.
-
#service_options ⇒ Object
Returns the value of attribute service_options.
-
#volumes ⇒ Object
Returns the value of attribute volumes.
Instance Method Summary collapse
- #command(command) ⇒ Object
-
#initialize(ami_id, service_options, options) ⇒ Instance
constructor
A new instance of Instance.
- #ip(ip_address) ⇒ Object
- #volume(volume_hash) ⇒ Object
Constructor Details
#initialize(ami_id, service_options, options) ⇒ Instance
Returns a new instance of Instance.
13 14 15 16 17 18 19 20 |
# File 'lib/ec2-starter/starter.rb', line 13 def initialize(ami_id, , ) @ami_id = ami_id.to_s @ips = [] @volumes = [] @commands = [] @default_options = {}.merge() @service_options = {}.merge() end |
Instance Attribute Details
#ami_id ⇒ Object
Returns the value of attribute ami_id.
11 12 13 |
# File 'lib/ec2-starter/starter.rb', line 11 def ami_id @ami_id end |
#commands ⇒ Object
Returns the value of attribute commands.
11 12 13 |
# File 'lib/ec2-starter/starter.rb', line 11 def commands @commands end |
#default_options ⇒ Object
Returns the value of attribute default_options.
11 12 13 |
# File 'lib/ec2-starter/starter.rb', line 11 def @default_options end |
#instance_id ⇒ Object
Returns the value of attribute instance_id.
11 12 13 |
# File 'lib/ec2-starter/starter.rb', line 11 def instance_id @instance_id end |
#ips ⇒ Object
Returns the value of attribute ips.
11 12 13 |
# File 'lib/ec2-starter/starter.rb', line 11 def ips @ips end |
#service_options ⇒ Object
Returns the value of attribute service_options.
11 12 13 |
# File 'lib/ec2-starter/starter.rb', line 11 def @service_options end |
#volumes ⇒ Object
Returns the value of attribute volumes.
11 12 13 |
# File 'lib/ec2-starter/starter.rb', line 11 def volumes @volumes end |
Instance Method Details
#command(command) ⇒ Object
30 31 32 |
# File 'lib/ec2-starter/starter.rb', line 30 def command(command) @commands << command end |
#ip(ip_address) ⇒ Object
22 23 24 |
# File 'lib/ec2-starter/starter.rb', line 22 def ip(ip_address) @ips << ip_address end |
#volume(volume_hash) ⇒ Object
26 27 28 |
# File 'lib/ec2-starter/starter.rb', line 26 def volume(volume_hash) @volumes << volume_hash end |