Class: Ifns::Responses::Cached

Inherits:
Base
  • Object
show all
Defined in:
lib/ifns/responses/cached.rb

Instance Attribute Summary

Attributes inherited from Base

#cached, #id

Instance Method Summary collapse

Methods inherited from Base

#accepted?, #gone?, #good?, #incorrect_fpd?, #incorrect_params?, #internal_error?, #invalid?, #not_found?, #rate_limit_exceeded?, #retry?, #valid?

Constructor Details

#initialize(id, cached) ⇒ Cached

Returns a new instance of Cached.



4
5
6
7
# File 'lib/ifns/responses/cached.rb', line 4

def initialize(id, cached)
  @id = id
  @cached = cached
end

Instance Method Details

#responseObject



9
10
11
# File 'lib/ifns/responses/cached.rb', line 9

def response
  OpenStruct.new(status: 200, body: { id: id, cached: cached })
end