Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Latest commit

 

History

History
27 lines (18 loc) · 686 Bytes

File metadata and controls

27 lines (18 loc) · 686 Bytes

Association

Archived. Association provided binary associations between objects using Ruby's >> operator. The concept of linked lists and associative relations is better served by Ruby's built-in data structures today. This repository is preserved for historical reference.

Description

General binary association allows one object to be associated with another. It has a variety of uses: link-lists, simple ordered maps and mixed collections.

:Apple >> :Fruit
:Apple >> :Red

:Apple.associations #=> [:Fruit, :Red]

c = [:a >> 1, :b >> 2]
c.each { |k,v| puts "#{k} associated with #{v}" }

Copyright

Copyright (c) 2005 Thomas Sawyer

Ruby License.