Module: JSONAPI::Serializable::Resource::Id::DSL
- Defined in:
- lib/jsonapi/serializable/resource/id.rb
Overview
DSL methods for declaring the resource id.
Instance Method Summary collapse
-
#id(&block) ⇒ Object
Declare the JSON API id of this resource.
- #inherited(klass) ⇒ Object
Instance Method Details
#id(&block) ⇒ Object
Declare the JSON API id of this resource.
41 42 43 |
# File 'lib/jsonapi/serializable/resource/id.rb', line 41 def id(&block) self.id_block = block end |
#inherited(klass) ⇒ Object
30 31 32 33 |
# File 'lib/jsonapi/serializable/resource/id.rb', line 30 def inherited(klass) super klass.id_block = id_block end |