Class: DockerfileRB::From
- Inherits:
-
Object
- Object
- DockerfileRB::From
- Defined in:
- lib/dockerfile-rb/from.rb
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#image_digest ⇒ Object
readonly
Returns the value of attribute image_digest.
-
#image_tag ⇒ Object
readonly
Returns the value of attribute image_tag.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(from_value, as_value) ⇒ From
constructor
A new instance of From.
Constructor Details
#initialize(from_value, as_value) ⇒ From
Returns a new instance of From.
4 5 6 7 8 9 |
# File 'lib/dockerfile-rb/from.rb', line 4 def initialize(from_value, as_value) @name = as_value @image = from_value.value.split(':')[0] @image_tag = from_value.value.split(':')[1] @image_digest = from_value.value.split('@')[1] end |
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
3 4 5 |
# File 'lib/dockerfile-rb/from.rb', line 3 def image @image end |
#image_digest ⇒ Object (readonly)
Returns the value of attribute image_digest.
3 4 5 |
# File 'lib/dockerfile-rb/from.rb', line 3 def image_digest @image_digest end |
#image_tag ⇒ Object (readonly)
Returns the value of attribute image_tag.
3 4 5 |
# File 'lib/dockerfile-rb/from.rb', line 3 def image_tag @image_tag end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/dockerfile-rb/from.rb', line 3 def name @name end |