Class: Ec2ssh::Ec2Instances::InstanceWrapper::TagsWrapper
- Inherits:
-
Object
- Object
- Ec2ssh::Ec2Instances::InstanceWrapper::TagsWrapper
- Defined in:
- lib/ec2ssh/ec2_instances.rb
Instance Method Summary collapse
-
#[](key) ⇒ Object
simulate.
-
#initialize(tags) ⇒ TagsWrapper
constructor
A new instance of TagsWrapper.
Constructor Details
#initialize(tags) ⇒ TagsWrapper
Returns a new instance of TagsWrapper.
11 12 13 |
# File 'lib/ec2ssh/ec2_instances.rb', line 11 def initialize() @tags = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
28 29 30 |
# File 'lib/ec2ssh/ec2_instances.rb', line 28 def method_missing(name, *args, &block) @tags.public_send(name, *args, &block) end |
Instance Method Details
#[](key) ⇒ Object
simulate
16 17 18 19 20 21 22 23 24 |
# File 'lib/ec2ssh/ec2_instances.rb', line 16 def [](key) if key.is_a? ::String raise DotfileValidationError, <<-MSG `tags[String]` syntax in the dotfile has been deleted since v4.0. Use `tag(String)` instead. See: https://github.com/mirakui/ec2ssh#how-to-upgrade-from-3x MSG end super end |