Class: Deck::Container::Cmd
Instance Method Summary
collapse
Methods included from Repeatable
#attributes, #next, #step
Methods included from Submodule
#attributes, #get, included, #map, #set, #value
Constructor Details
#initialize ⇒ Cmd
Returns a new instance of Cmd.
8
9
|
# File 'lib/deck/container/cmd.rb', line 8
def initialize
end
|
Instance Method Details
#build_command(deps) ⇒ Object
22
23
24
|
# File 'lib/deck/container/cmd.rb', line 22
def build_command(deps)
"RUN cd #{attributes[:workdir]} && #{attributes[:command]}"
end
|
#define(command, workdir: '/') ⇒ Object
11
12
13
14
15
16
|
# File 'lib/deck/container/cmd.rb', line 11
def define(command, workdir: '/')
step do
attributes[:command] = command
attributes[:workdir] = workdir
end
end
|
#export ⇒ Object
18
19
20
|
# File 'lib/deck/container/cmd.rb', line 18
def export
attributes[:command]
end
|