Sha256: 840c698d1fc38760aa89c4ba1a9e2cd9238f47fa194a50052118f2097b19541b

Contents?: true

Size: 706 Bytes

Versions: 21

Compression:

Stored size: 706 Bytes

Contents

module Typhoeus
  class Request

    # This module contains custom serializer.
    module Marshal

      # Return the important data needed to serialize this Request, except the
      # `on_complete`, `on_success`, `on_failure`, and `hydra`, since they cannot be marshalled.
      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

      # Load.
      def marshal_load(attributes)
        attributes.each { |name, value| instance_variable_set(name, value) }
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 5 rubygems

Version Path
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.0/lib/typhoeus/request/marshal.rb
cloudsmith-api-0.30.7 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.0/lib/typhoeus/request/marshal.rb
color_me_shop-1.0.0 vendor/bundle/ruby/2.5.0/gems/typhoeus-1.3.0/lib/typhoeus/request/marshal.rb
cloudsmith-api-0.21.4 vendor/bundle/ruby/2.3.0/gems/typhoeus-1.3.0/lib/typhoeus/request/marshal.rb
typhoeus-1.3.0 lib/typhoeus/request/marshal.rb
typhoeus-1.1.2 lib/typhoeus/request/marshal.rb
typhoeus-1.1.1 lib/typhoeus/request/marshal.rb
typhoeus-1.1.0 lib/typhoeus/request/marshal.rb
typhoeus-1.0.2 lib/typhoeus/request/marshal.rb
typhoeus-1.0.1 lib/typhoeus/request/marshal.rb
typhoeus-1.0.0 lib/typhoeus/request/marshal.rb
dwolla_swagger-1.0.6 vendor/bundle/ruby/2.2.0/gems/typhoeus-0.8.0/lib/typhoeus/request/marshal.rb
typhoeus-0.8.0 lib/typhoeus/request/marshal.rb
typhoeus-0.7.3 lib/typhoeus/request/marshal.rb
typhoeus-0.7.2 lib/typhoeus/request/marshal.rb
typhoeus-0.7.1 lib/typhoeus/request/marshal.rb
typhoeus-0.7.0 lib/typhoeus/request/marshal.rb
typhoeus-0.7.0.pre1 lib/typhoeus/request/marshal.rb
typhoeus-0.6.9 lib/typhoeus/request/marshal.rb
typhoeus-0.6.8 lib/typhoeus/request/marshal.rb