Class: ActiveModel::Serializer::Association

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_model/serializer/association.rb

Overview

This class hold all information about serializer's association.

Examples:

Association.new(:comments, CommentSummarySerializer)

Instance Attribute Summary (collapse)

Instance Attribute Details

Returns the value of attribute links

Returns:

  • (Object)

    the current value of links



12
13
14
# File 'lib/active_model/serializer/association.rb', line 12

def links
  @links
end

- (Object) meta

Returns the value of attribute meta

Returns:

  • (Object)

    the current value of meta



12
13
14
# File 'lib/active_model/serializer/association.rb', line 12

def meta
  @meta
end

- (Symbol) name

Returns the current value of name

Returns:

  • (Symbol)

    the current value of name



12
13
14
# File 'lib/active_model/serializer/association.rb', line 12

def name
  @name
end

- (Hash{Symbol => Object}) options

Returns the current value of options

Returns:

  • (Hash{Symbol => Object})

    the current value of options



12
13
14
# File 'lib/active_model/serializer/association.rb', line 12

def options
  @options
end

- (ActiveModel::Serializer) serializer

Returns the current value of serializer

Returns:



12
13
14
# File 'lib/active_model/serializer/association.rb', line 12

def serializer
  @serializer
end