Package src :: Package com :: Package deviceatlas :: Package device :: Module trim_transformer :: Class TrimTransformer
[frames] | no frames]

Class TrimTransformer

Represents a "tt" node (trim transformation) within a "pm" (property mappings) node. Trims a defined prefix and suffix from an input.

@author DeviceAtlas Limited

Instance Methods
 
__init__(self, prefix_to_remove, suffix_to_remove)
 
get_prefix_to_remove(self)
 
get_suffix_to_remove(self)
 
transform(self, input_value)
Remove the prefix and suffix strings from the inputValue.
Method Details

transform(self, input_value)

 

Remove the prefix and suffix strings from the inputValue. It is expected that inputValue has already had extra whitespace removed in DeviceApi.normaliseHeaders() or in ClientSideParser.parse() . :param input_value: :return: