Module: ActiveJob::Arguments
Relationships & Source Files | |
Defined in: | activejob/lib/active_job/arguments.rb |
Constant Summary
-
GLOBALID_KEY =
private
# File 'activejob/lib/active_job/arguments.rb', line 48'_aj_globalid'.freeze
-
RESERVED_KEYS =
private
# File 'activejob/lib/active_job/arguments.rb', line 118[ GLOBALID_KEY, GLOBALID_KEY.to_sym, SYMBOL_KEYS_KEY, SYMBOL_KEYS_KEY.to_sym, WITH_INDIFFERENT_ACCESS_KEY, WITH_INDIFFERENT_ACCESS_KEY.to_sym, ]
-
SYMBOL_KEYS_KEY =
private
# File 'activejob/lib/active_job/arguments.rb', line 49'_aj_symbol_keys'.freeze
-
WITH_INDIFFERENT_ACCESS_KEY =
private
# File 'activejob/lib/active_job/arguments.rb', line 50'_aj_hash_with_indifferent_access'.freeze
Instance Method Summary
-
#deserialize(arguments)
Deserializes a set of arguments.
-
#serialize(arguments)
Serializes a set of arguments.
Instance Method Details
#deserialize(arguments)
Deserializes a set of arguments. Whitelisted types are returned as-is. Arrays/Hashes are deserialized element by element. All other types are deserialized using GlobalID.
# File 'activejob/lib/active_job/arguments.rb', line 41
def deserialize(arguments) arguments.map { |argument| deserialize_argument(argument) } rescue => e raise DeserializationError.new(e) end
#serialize(arguments)
Serializes a set of arguments. Whitelisted types are returned as-is. Arrays/Hashes are serialized element by element. All other types are serialized using GlobalID.
# File 'activejob/lib/active_job/arguments.rb', line 34
def serialize(arguments) arguments.map { |argument| serialize_argument(argument) } end