Class: Holodekk::Docker::Dockerfile::InstructionBuilder::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/holodekk/docker/dockerfile/instruction_builder/option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key = '', value = '') ⇒ Option

Returns a new instance of Option.



10
11
12
13
# File 'lib/holodekk/docker/dockerfile/instruction_builder/option.rb', line 10

def initialize(key = '', value = '')
  @key = key
  @value = value
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



8
9
10
# File 'lib/holodekk/docker/dockerfile/instruction_builder/option.rb', line 8

def key
  @key
end

#valueObject

Returns the value of attribute value.



8
9
10
# File 'lib/holodekk/docker/dockerfile/instruction_builder/option.rb', line 8

def value
  @value
end

Instance Method Details

#outputObject



15
16
17
# File 'lib/holodekk/docker/dockerfile/instruction_builder/option.rb', line 15

def output
  "--#{key}=#{value}"
end