module Typhoeus::Request::Marshal
This module contains custom serializer.
Public Instance Methods
marshal_dump()
click to toggle source
Return the important data needed to serialize this Request
, except the `on_complete`, `on_success`, `on_failure`, and `hydra`, since they cannot be marshalled.
# File lib/typhoeus/request/marshal.rb, line 9 def marshal_dump unmarshallable = %w(@on_complete @on_success @on_failure @on_headers @on_body @hydra) (instance_variables - unmarshallable - unmarshallable.map(&:to_sym)).map do |name| [name, instance_variable_get(name)] end end
marshal_load(attributes)
click to toggle source
Load.
# File lib/typhoeus/request/marshal.rb, line 17 def marshal_load(attributes) attributes.each { |name, value| instance_variable_set(name, value) } end