Module: EacDocker::Container::Identifiers

Defined in:
lib/eac_docker/container/identifiers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

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

#identifierString

Value that identifies the container to Docker commands: #id, if present, or #name.

Returns:

  • (String)


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