Class: PagerDuty::Connection::ConvertTimesParametersToISO8601
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- PagerDuty::Connection::ConvertTimesParametersToISO8601
- Defined in:
- lib/pager_duty/connection.rb
Constant Summary collapse
- TIME_KEYS =
[:since, :until]
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/pager_duty/connection.rb', line 49 def call(env) body = env[:body] TIME_KEYS.each do |key| if body.has_key?(key) body[key] = body[key].iso8601 if body[key].respond_to?(:iso8601) end end response = @app.call env end |