Class: Indocker::DockerDirectives::Cmd

Inherits:
Base show all
Defined in:
lib/indocker/directives/docker_directives/cmd.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods inherited from Indocker::Directives::Base

#build_directive?, #container_directive?, #partial?, #prepare_directive?

Constructor Details

#initialize(command) ⇒ Cmd

Returns a new instance of Cmd.



4
5
6
# File 'lib/indocker/directives/docker_directives/cmd.rb', line 4

def initialize(command)
  @command = command
end

Instance Attribute Details

#command ⇒ Object (readonly)

Returns the value of attribute command.



2
3
4
# File 'lib/indocker/directives/docker_directives/cmd.rb', line 2

def command
  @command
end

Instance Method Details

#to_s ⇒ Object



8
9
10
# File 'lib/indocker/directives/docker_directives/cmd.rb', line 8

def to_s
  "#{type} #{command.inspect}"
end

#type ⇒ Object



12
13
14
# File 'lib/indocker/directives/docker_directives/cmd.rb', line 12

def type
  'CMD'
end