Class: FluentECS::Container
- Inherits:
-
Object
- Object
- FluentECS::Container
- Extended by:
- Forwardable
- Defined in:
- lib/fluent_ecs/container.rb
Instance Attribute Summary collapse
-
#docker_id ⇒ Object
Returns the value of attribute docker_id.
-
#docker_name ⇒ Object
Returns the value of attribute docker_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#task ⇒ Object
Returns the value of attribute task.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Container
constructor
A new instance of Container.
- #method_missing(method_id, *args, &_block) ⇒ Object
- #respond_to_missing?(method_id, include_private = false) ⇒ Boolean
Constructor Details
#initialize(attrs = {}) ⇒ Container
Returns a new instance of Container.
15 16 17 18 19 |
# File 'lib/fluent_ecs/container.rb', line 15 def initialize(attrs = {}) @docker_id = attrs['DockerId'] @docker_name = attrs['DockerName'] @name = attrs['Name'] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_id, *args, &_block) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/fluent_ecs/container.rb', line 21 def method_missing(method_id, *args, &_block) if method_id == :to_h self.class.class_eval hash_definition to_h else super end end |
Instance Attribute Details
#docker_id ⇒ Object
Returns the value of attribute docker_id.
4 5 6 |
# File 'lib/fluent_ecs/container.rb', line 4 def docker_id @docker_id end |
#docker_name ⇒ Object
Returns the value of attribute docker_name.
4 5 6 |
# File 'lib/fluent_ecs/container.rb', line 4 def docker_name @docker_name end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/fluent_ecs/container.rb', line 4 def name @name end |
#task ⇒ Object
Returns the value of attribute task.
4 5 6 |
# File 'lib/fluent_ecs/container.rb', line 4 def task @task end |
Class Method Details
Instance Method Details
#respond_to_missing?(method_id, include_private = false) ⇒ Boolean
30 31 32 |
# File 'lib/fluent_ecs/container.rb', line 30 def respond_to_missing?(method_id, include_private = false) method_id == :to_h || super end |