Sha256: cd1a354ac29ac031ea8912dec1db7758889e6d5509ac576b11e400c128dff721

Contents?: true

Size: 269 Bytes

Versions: 3

Compression:

Stored size: 269 Bytes

Contents

require 'faraday_middleware/response_middleware'

module FaradayMiddleware
  # Public: Restore marshalled Ruby objects in response bodies.
  class ParseMarshal < ResponseMiddleware
    define_parser { |body|
      ::Marshal.load body unless body.empty?
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
faraday_middleware-0.8.2 lib/faraday_middleware/response/parse_marshal.rb
faraday_middleware-0.8.1 lib/faraday_middleware/response/parse_marshal.rb
faraday_middleware-0.8.0 lib/faraday_middleware/response/parse_marshal.rb