Class: Hadupils::Commands::SimpleCommand
- Inherits:
-
Object
- Object
- Hadupils::Commands::SimpleCommand
- Defined in:
- lib/hadupils/commands.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params = []) ⇒ SimpleCommand
constructor
A new instance of SimpleCommand.
- #successful?(exitstatus) ⇒ Boolean
Constructor Details
#initialize(params = []) ⇒ SimpleCommand
Returns a new instance of SimpleCommand.
25 26 27 |
# File 'lib/hadupils/commands.rb', line 25 def initialize(params=[]) @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
23 24 25 |
# File 'lib/hadupils/commands.rb', line 23 def params @params end |
Class Method Details
.run(params = []) ⇒ Object
29 30 31 |
# File 'lib/hadupils/commands.rb', line 29 def self.run(params=[]) self.new(params).run end |
Instance Method Details
#successful?(exitstatus) ⇒ Boolean
33 34 35 |
# File 'lib/hadupils/commands.rb', line 33 def successful?(exitstatus) exitstatus == 0 end |