Class: JSONAPI::Realizer::Resource::Relation
- Inherits:
-
Object
- Object
- JSONAPI::Realizer::Resource::Relation
- Includes:
- ActiveModel::Model
- Defined in:
- lib/jsonapi/realizer/resource/relation.rb
Instance Attribute Summary collapse
-
#as ⇒ Object
Returns the value of attribute as.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#realizer_class_name ⇒ Object
Returns the value of attribute realizer_class_name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(**keyword_arguments) ⇒ Relation
constructor
A new instance of Relation.
- #realizer_class ⇒ Object
Constructor Details
#initialize(**keyword_arguments) ⇒ Relation
Returns a new instance of Relation.
19 20 21 22 23 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 19 def initialize(**keyword_arguments) super(**keyword_arguments) validate! end |
Instance Attribute Details
#as ⇒ Object
Returns the value of attribute as.
10 11 12 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 10 def as @as end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 8 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
7 8 9 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 7 def owner @owner end |
#realizer_class_name ⇒ Object
Returns the value of attribute realizer_class_name.
11 12 13 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 11 def realizer_class_name @realizer_class_name end |
#type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 9 def type @type end |
Instance Method Details
#realizer_class ⇒ Object
25 26 27 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 25 def realizer_class realizer_class_name.constantize end |