W3cubDocs

/Ruby on Rails 7.0

module ActiveJob::Arguments

Public Instance Methods

deserialize(arguments) Show source
# File activejob/lib/active_job/arguments.rb, line 41
def deserialize(arguments)
  arguments.map { |argument| deserialize_argument(argument) }
rescue
  raise DeserializationError
end

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.

serialize(arguments) Show source
# File activejob/lib/active_job/arguments.rb, line 33
def serialize(arguments)
  arguments.map { |argument| serialize_argument(argument) }
end

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.

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.