Class: JsonApiResource::Handlers::FindHandler
- Inherits:
-
Object
- Object
- JsonApiResource::Handlers::FindHandler
- Defined in:
- lib/json_api_resource/handlers/find_handler.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(results) ⇒ FindHandler
constructor
A new instance of FindHandler.
Constructor Details
#initialize(results) ⇒ FindHandler
Returns a new instance of FindHandler.
6 7 8 9 10 11 12 |
# File 'lib/json_api_resource/handlers/find_handler.rb', line 6 def initialize(results) self.result = results.first self.result. = results. self.result.linked_data = results.try(:linked_data) end |
Instance Attribute Details
#result ⇒ Object
Returns the value of attribute result.
4 5 6 |
# File 'lib/json_api_resource/handlers/find_handler.rb', line 4 def result @result end |