Module: Hashery::Association::Kernel

Included in:
Object
Defined in:
lib/hashery/association.rb

Overview

Object extensions.

Instance Method Summary collapse

Instance Method Details

#>>(to) ⇒ Association

Define an association for self.

Parameters:

  • to

    The value of the association.

Returns:



168
169
170
# File 'lib/hashery/association.rb', line 168

def >>(to)
  Association.new(self, to)
end

#associationsObject

List of associations for this object.

Returns:

  • an ‘Array` of `Associations`.



177
178
179
# File 'lib/hashery/association.rb', line 177

def associations
  Association.reference[self]
end