Class: Strapper::Cmd
- Inherits:
-
Object
- Object
- Strapper::Cmd
- Defined in:
- lib/strapper/cmd.rb
Instance Method Summary collapse
-
#initialize(cmd_to_run) ⇒ Cmd
constructor
A new instance of Cmd.
- #run ⇒ Object
Constructor Details
#initialize(cmd_to_run) ⇒ Cmd
Returns a new instance of Cmd.
4 5 6 |
# File 'lib/strapper/cmd.rb', line 4 def initialize(cmd_to_run) @cmd_to_run = cmd_to_run end |
Instance Method Details
#run ⇒ Object
8 9 10 11 |
# File 'lib/strapper/cmd.rb', line 8 def run puts "Running \"#{@cmd_to_run}\"" `#{@cmd_to_run}` end |