Module: EacDocker::Container::Identifiers
- Defined in:
- lib/eac_docker/container/identifiers.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#identifier ⇒ String
Value that identifies the container to Docker commands: #id, if present, or #name.
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/eac_docker/container/identifiers.rb', line 10 def id @id end |
Instance Method Details
#identifier ⇒ String
Value that identifies the container to Docker commands: #id, if present, or #name.
15 16 17 18 |
# File 'lib/eac_docker/container/identifiers.rb', line 15 def identifier id.presence || name.presence || raise('Neither `id` or `name` is present ' \ '- need at least one of them') end |