Class: Eastrails::Commands::Base
- Defined in:
- lib/eastrails/commands/base.rb
Instance Attribute Summary collapse
-
#parameter ⇒ Object
Returns the value of attribute parameter.
Instance Method Summary collapse
-
#initialize(parameter) ⇒ Base
constructor
A new instance of Base.
- #run_in_shell(cmd) ⇒ Object
Constructor Details
#initialize(parameter) ⇒ Base
Returns a new instance of Base.
6 7 8 9 |
# File 'lib/eastrails/commands/base.rb', line 6 def initialize(parameter) self.parameter = parameter super() end |
Instance Attribute Details
#parameter ⇒ Object
Returns the value of attribute parameter.
4 5 6 |
# File 'lib/eastrails/commands/base.rb', line 4 def parameter @parameter end |
Instance Method Details
#run_in_shell(cmd) ⇒ Object
11 12 13 |
# File 'lib/eastrails/commands/base.rb', line 11 def run_in_shell(cmd) run %{/bin/bash --login -c "#{cmd}"} end |