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
-
#links ⇒ Object
Returns the value of attribute links.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#name ⇒ Symbol
The current value of name.
-
#options ⇒ Hash{Symbol => Object}
The current value of options.
-
#serializer ⇒ ActiveModel::Serializer
The current value of serializer.
Instance Method Summary collapse
Instance Attribute Details
#links ⇒ Object
Returns the value of attribute links
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def links @links end |
#meta ⇒ Object
Returns the value of attribute meta
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def @meta end |
#name ⇒ Symbol
Returns the current value of name.
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def name @name end |
#options ⇒ Hash{Symbol => Object}
Returns the current value of options.
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def @options end |
#serializer ⇒ ActiveModel::Serializer
Returns the current value of serializer.
12 13 14 |
# File 'lib/active_model/serializer/association.rb', line 12 def serializer @serializer end |
Instance Method Details
#key ⇒ Symbol
14 15 16 |
# File 'lib/active_model/serializer/association.rb', line 14 def key .fetch(:key, name) end |