Module: ActiveJob::Arguments
Instance Method Summary collapse
-
#deserialize(arguments) ⇒ Object
Deserializes a set of arguments.
-
#serialize(arguments) ⇒ Object
Serializes a set of arguments.
Instance Method Details
#deserialize(arguments) ⇒ Object
Deserializes a set of arguments. Intrinsic types that can safely be deserialized without mutation are returned as-is. Arrays/Hashes are deserialized element by element. All other types are deserialized using GlobalID.
42 43 44 45 46 |
# File 'activejob/lib/active_job/arguments.rb', line 42 def deserialize(arguments) arguments.map { |argument| deserialize_argument(argument) } rescue raise DeserializationError end |
#serialize(arguments) ⇒ Object
Serializes a set of arguments. Intrinsic types that can safely be serialized without mutation are returned as-is. Arrays/Hashes are serialized element by element. All other types are serialized using GlobalID.
34 35 36 |
# File 'activejob/lib/active_job/arguments.rb', line 34 def serialize(arguments) arguments.map { |argument| serialize_argument(argument) } end |