class Rubyipmi::Ipmitool::ErrorCodes
Constants
- CODES
Public Class Methods
code()
click to toggle source
# File lib/rubyipmi/ipmitool/errorcodes.rb, line 15 def self.code CODES end
length()
click to toggle source
# File lib/rubyipmi/ipmitool/errorcodes.rb, line 11 def self.length CODES.length end
search(code)
click to toggle source
# File lib/rubyipmi/ipmitool/errorcodes.rb, line 19 def self.search(code) fix = CODES.fetch(code, nil) if fix.nil? CODES.each do |error, result| # the error should be a subset of the actual erorr return result if code =~ /.*#{error}.*/i end else return fix end raise "No Fix found" if fix.nil? end