Class: TwistlockControl::Entities::ContainerDescription
- Inherits:
-
TwistlockControl::Entity
- Object
- TwistlockControl::Entity
- TwistlockControl::Entities::ContainerDescription
- Defined in:
- lib/twistlock_control/entities/container.rb
Overview
A ContainerDescription represents the container description file that’s used to describe properties of containers.
Instance Method Summary collapse
Methods inherited from TwistlockControl::Entity
Instance Method Details
#serialize ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/twistlock_control/entities/container.rb', line 23 def serialize provided_services = (provided_services || {}).inject({}) { |r, (k, v)| r[k] = v.attributes } consumed_services = (consumed_services || {}).inject({}) { |r, (k, v)| r[k] = v.attributes } attributes.dup.merge!( provided_services: provided_services, consumed_services: consumed_services ) end |