lib/ury_rapid/common/payload.rb
# Coaxes a payload ID into a valid type
#
# This can either be a Symbol or an Integer.
Coaxes a payload ID into a valid type
This can either be a Symbol or an Integer.
Coaxes a payload ID into a valid type This can either be a Symbol or an Integer .
def make_valid_id(id)
        Integer(id.to_s)
      rescue TypeError, RangeError, ArgumentError
        id.to_sym
      end
def make_valid_id ( id ) Integer ( id . to_s ) rescue TypeError , RangeError , ArgumentError id . to_sym end
Coaxes a payload ID into a valid type
This can either be a Symbol or an Integer.
Coaxes a payload ID into a valid type This can either be a Symbol or an Integer .
# This to_s allows IDs that have been symbolised earlier up to be # turned into Integers.
id