Class: Roar::JSON::JSONAPI::Resource
- Inherits:
-
Module
- Object
- Module
- Roar::JSON::JSONAPI::Resource
- Defined in:
- lib/roar/json/json_api.rb
Overview
Include to define a JSON API Resource and make API methods available to
your Roar::Decorator
.
Instance Method Summary collapse
-
#initialize(type, options = {}) ⇒ Resource
constructor
A new instance of Resource.
Constructor Details
#initialize(type, options = {}) ⇒ Resource
Returns a new instance of Resource.
27 28 29 30 |
# File 'lib/roar/json/json_api.rb', line 27 def initialize(type, = {}) @type = type @id_key = .fetch(:id_key, :id) end |