Parent

Methods

FaradayMiddleware::ParseDates

Parse dates from response body

Constants

ISO_DATE_FORMAT

Public Class Methods

new(app, options = {}) click to toggle source
# File lib/faraday_middleware/response/parse_dates.rb, line 9
def initialize(app, options = {})
  @regexp = options[:match] || ISO_DATE_FORMAT
  super(app)
end

Public Instance Methods

call(env) click to toggle source
# File lib/faraday_middleware/response/parse_dates.rb, line 14
def call(env)
  response = @app.call(env)
  parse_dates! response.env[:body]
  response
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.