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.
21 22 23 24 25 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 21 def initialize(**keyword_arguments) super(**keyword_arguments) validate! end |
Instance Attribute Details
#as ⇒ Object
Returns the value of attribute as.
12 13 14 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 12 def as @as end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 10 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
9 10 11 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 9 def owner @owner end |
#realizer_class_name ⇒ Object
Returns the value of attribute realizer_class_name.
13 14 15 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 13 def realizer_class_name @realizer_class_name end |
#type ⇒ Object
Returns the value of attribute type.
11 12 13 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 11 def type @type end |
Instance Method Details
#realizer_class ⇒ Object
27 28 29 |
# File 'lib/jsonapi/realizer/resource/relation.rb', line 27 def realizer_class realizer_class_name.constantize end |