Class: QB::Docker::Image::Tag

Inherits:
QB::Data::Immutable show all
Includes:
NRSER::Log::Mixin
Defined in:
lib/qb/docker/image/tag.rb

Overview

A Docker image tag, with support for paring versions.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_s(string) ⇒ return_type

TODO:

Document from_s method.

Returns @todo Document return value.

Parameters:

  • arg_name (type)

    @todo Add name param description.

Returns:

  • (return_type)

    @todo Document return value.



54
55
56
# File 'lib/qb/docker/image/tag.rb', line 54

def self.from_s string
  new source: string
end

Instance Method Details

#dirty?Boolean

Returns:

  • (Boolean)


100
101
102
# File 'lib/qb/docker/image/tag.rb', line 100

def dirty?
  version && version.build_dirty?
end

#to_sObject

Instance Methods



91
92
93
94
95
96
97
# File 'lib/qb/docker/image/tag.rb', line 91

def to_s
  if version
    version.docker_tag
  else
    source
  end
end