Class: Deck::Container::Env

Inherits:
Object
  • Object
show all
Includes:
Repeatable, Submodule
Defined in:
lib/deck/container/env.rb

Instance Method Summary collapse

Methods included from Repeatable

#attributes, #next, #step

Methods included from Submodule

#attributes, #get, included, #map, #set, #value

Constructor Details

#initializeEnv

Returns a new instance of Env.



8
9
# File 'lib/deck/container/env.rb', line 8

def initialize
end

Instance Method Details

#build_command(deps) ⇒ Object



22
23
24
# File 'lib/deck/container/env.rb', line 22

def build_command(deps)
  "ENV #{attributes[:name]} #{attributes[:value]}"
end

#define(name, value) ⇒ Object



11
12
13
14
15
16
# File 'lib/deck/container/env.rb', line 11

def define(name, value)
  step do
    attributes[:name] = name
    attributes[:value] = value
  end
end

#exportObject



18
19
20
# File 'lib/deck/container/env.rb', line 18

def export
  {attributes[:name].to_sym => attributes[:value]}
end