Method: Cosmos::ProcessorConversion#call

Defined in:
lib/cosmos/conversions/processor_conversion.rb

#call(value, packet, buffer) ⇒ Varies

Returns The result of the associated processor.

Parameters:

  • The value to convert

  • The packet which contains the value. This can be useful to reach into the packet and use other values in the conversion.

  • The packet buffer

Returns:

  • The result of the associated processor



42
43
44
# File 'lib/cosmos/conversions/processor_conversion.rb', line 42

def call(value, packet, buffer)
  packet.processors[@processor_name].results[@result_name] || 0 # Never return nil
end