Class: Ivy::Serializers::Relationships::Relationship

Inherits:
Object
  • Object
show all
Defined in:
lib/ivy/serializers/relationships/relationship.rb

Direct Known Subclasses

BelongsTo, HasMany

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}, &getter) ⇒ Relationship

Returns a new instance of Relationship.



5
6
7
8
9
# File 'lib/ivy/serializers/relationships/relationship.rb', line 5

def initialize(name, options={}, &getter)
  @name = name
  @options = options
  @getter = getter || method(:default_getter)
end