Class: Ifns::Responses::Cached
- Defined in:
- lib/ifns/responses/cached.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(id, cached) ⇒ Cached
constructor
A new instance of Cached.
- #response ⇒ Object
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
#response ⇒ Object
9 10 11 |
# File 'lib/ifns/responses/cached.rb', line 9 def response OpenStruct.new(status: 200, body: { id: id, cached: cached }) end |