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)
 
transform(self, input_value)
Remove the prefix and suffix strings from the inputValue.
Properties
  prefix_to_remove
  suffix_to_remove
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:


Property Details

prefix_to_remove

Get Method:
unreachable.prefix_to_remove(self)

suffix_to_remove

Get Method:
unreachable.suffix_to_remove(self)