Class: Hadupils::Commands::SimpleCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/hadupils/commands.rb

Direct Known Subclasses

Cleanup, Hadoop, Hive, MkTmpFile, RmFile, WithTmpDir

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#paramsObject (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

Returns:

  • (Boolean)


33
34
35
# File 'lib/hadupils/commands.rb', line 33

def successful?(exitstatus)
  exitstatus == 0
end