Class: Deck::Container::From

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

Instance Method Summary collapse

Methods included from Submodule

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

Instance Method Details

#build_command(deps) ⇒ Object



16
17
18
19
20
# File 'lib/deck/container/from.rb', line 16

def build_command(deps)
  repository = attributes[:repository]
  repository = deps[:repository].get if repository.nil?
  "FROM #{repository}/#{export}"
end

#define(name, of: nil) ⇒ Object



7
8
9
10
# File 'lib/deck/container/from.rb', line 7

def define(name, of: nil)
  attributes[:name] = name
  attributes[:repository] = of
end

#exportObject



12
13
14
# File 'lib/deck/container/from.rb', line 12

def export
  attributes[:name]
end