Class: Threeman::Command
- Inherits:
-
Object
- Object
- Threeman::Command
- Defined in:
- lib/threeman/command.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#name ⇒ Object
Returns the value of attribute name.
-
#port ⇒ Object
Returns the value of attribute port.
-
#workdir ⇒ Object
Returns the value of attribute workdir.
Instance Method Summary collapse
- #bash_script ⇒ Object
-
#initialize(name, command, workdir, port) ⇒ Command
constructor
A new instance of Command.
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
#command ⇒ Object
Returns the value of attribute command.
5 6 7 |
# File 'lib/threeman/command.rb', line 5 def command @command end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/threeman/command.rb', line 5 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
5 6 7 |
# File 'lib/threeman/command.rb', line 5 def port @port end |
#workdir ⇒ Object
Returns the value of attribute workdir.
5 6 7 |
# File 'lib/threeman/command.rb', line 5 def workdir @workdir end |
Instance Method Details
#bash_script ⇒ Object
14 15 16 |
# File 'lib/threeman/command.rb', line 14 def bash_script "export PORT=#{port} ; #{command}" end |