Class: Threeman::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/threeman/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, command, workdir, port) ⇒ Command

Returns a new instance of Command.



7
8
9
10
11
12
# File 'lib/threeman/command.rb', line 7

def initialize(name, command, workdir, port)
  @name = name
  @command = command
  @workdir = workdir
  @port = port
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



5
6
7
# File 'lib/threeman/command.rb', line 5

def command
  @command
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/threeman/command.rb', line 5

def name
  @name
end

#portObject

Returns the value of attribute port.



5
6
7
# File 'lib/threeman/command.rb', line 5

def port
  @port
end

#workdirObject

Returns the value of attribute workdir.



5
6
7
# File 'lib/threeman/command.rb', line 5

def workdir
  @workdir
end

Instance Method Details

#bash_scriptObject



14
15
16
# File 'lib/threeman/command.rb', line 14

def bash_script
  "export PORT=#{port} ; #{command}"
end