Class: Rubyipmi::Ipmitool::Sensors

Inherits:
BaseCommand show all
Includes:
SensorsMixin
Defined in:
lib/rubyipmi/ipmitool/commands/sensors.rb

Instance Attribute Summary

Attributes inherited from BaseCommand

#cmd, #lastcall, #max_retry_count, #options, #passfile, #result

Instance Method Summary collapse

Methods included from SensorsMixin

#count, #fanlist, #list, #names, #refresh, #templist

Methods inherited from BaseCommand

#find_fix, #makecommand, #max_retry_count, #setpass

Methods inherited from BaseCommand

#dump_command, #find_fix, #locate_command, #logger, #makecommand, #removepass, #run, #runcmd, #setpass, #update, #validate_status

Constructor Details

#initialize(opts = ObservableHash.new) ⇒ Sensors

Returns a new instance of Sensors.



7
8
9
# File 'lib/rubyipmi/ipmitool/commands/sensors.rb', line 7

def initialize(opts = ObservableHash.new)
  super("ipmitool", opts)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rubyipmi::SensorsMixin

Instance Method Details

#getsensorsObject



11
12
13
14
15
16
# File 'lib/rubyipmi/ipmitool/commands/sensors.rb', line 11

def getsensors
  options["cmdargs"] = "sensor"
  runcmd
  options.delete_notify("cmdargs")
  @result
end

#sensor_classObject



18
19
20
# File 'lib/rubyipmi/ipmitool/commands/sensors.rb', line 18

def sensor_class
  Sensor
end