Class: ActiveModel::Serializer::Association
- Inherits:
-
Struct
- Object
- Struct
- ActiveModel::Serializer::Association
- Defined in:
- lib/active_model/serializer/association.rb
Overview
This class hold all information about serializer’s association.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#serializer ⇒ Object
Returns the value of attribute serializer.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def name @name end |
#options ⇒ Object
Returns the value of attribute options
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def @options end |
#serializer ⇒ Object
Returns the value of attribute serializer
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def serializer @serializer end |
Instance Method Details
#key ⇒ Symbol
15 16 17 |
# File 'lib/active_model/serializer/association.rb', line 15 def key .fetch(:key, name) end |