Module: Hashery::Association::Kernel

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

Overview

Object extensions.

Instance Method Summary (collapse)

Instance Method Details

- (Object) >>(to)

Define an association for self.

to - The value of the association.

Returns [Association].



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

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

- (Object) associations

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