NAME
FusionInventory::Agent::Tools::PartNumber - PartNumber class
DESCRIPTION
This module provides a base class to handle PartNumber specific cases
METHODS
new(%params)
The constructor. The following parameters are allowed, as keys of the %params hash:
- logger
-
the logger object to use (default: a new stderr logger)
match(%params)
This is the method checking for supported PartNumber sub-class handling the set PartNumber. The following parameters are allowed, as keys of the %params hash:
- partnumber
-
the partnumber string (mandatory)
- category
-
the category to filter out subclasses
- manufacturer
-
the manufacturer to select subclass by manufacturer
init()
This is a method to be implemented by each subclass and to initialize the object. It can take partnumber matches as arguments when a subclass regexp match.
match_re()
This is a method to be implemented by each subclass. It could simply return a regexp which could applied on partnumber string permitting to select the subclass in case of matches.
manufacturer()
This is a method to be implemented by each subclass. It should simply return a constant string.
category()
This is a method to be implemented by each subclass. It should simply return a constant string.
speed()
This is a method to return memory speed.
type()
This is a method to return memory type.
revision()
This is a method to return revision part from the partnumber.
get()
This is a method to return the partnumber itself in the case it has been fixed during init() method call.