Class: AWS::EC2::Instance
- Inherits:
-
Object
- Object
- AWS::EC2::Instance
- Defined in:
- lib/instance.rb
Instance Attribute Summary collapse
-
#instance_id ⇒ Object
Returns the value of attribute instance_id.
-
#launch_time ⇒ Object
Returns the value of attribute launch_time.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(init_hash = {}) ⇒ Instance
constructor
A new instance of Instance.
- #match?(tag) ⇒ Boolean
Constructor Details
#initialize(init_hash = {}) ⇒ Instance
Returns a new instance of Instance.
7 8 9 10 11 |
# File 'lib/instance.rb', line 7 def initialize(init_hash = {}) init_hash.each do |k, v| self.send(k.to_s + "=", v) unless !self.respond_to?(k.to_s + "=") end end |
Instance Attribute Details
#instance_id ⇒ Object
Returns the value of attribute instance_id.
5 6 7 |
# File 'lib/instance.rb', line 5 def instance_id @instance_id end |
#launch_time ⇒ Object
Returns the value of attribute launch_time.
5 6 7 |
# File 'lib/instance.rb', line 5 def launch_time @launch_time end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/instance.rb', line 5 def status @status end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/instance.rb', line 5 def @tags end |
Instance Method Details
#match?(tag) ⇒ Boolean
13 14 15 |
# File 'lib/instance.rb', line 13 def match?(tag) self..detect { |k, v| v.to_s.match /#{tag}/ } end |