Sha256: dd23fe739955376fb1decbdb9b9d6f0b566cad78ed03347cca12dc39d8fc4073
Contents?: true
Size: 444 Bytes
Versions: 7
Compression:
Stored size: 444 Bytes
Contents
module CompositePrimaryKeys ID_SEP = ',' ID_SET_SEP = ';' module ArrayExtension def to_composite_keys CompositeKeys.new(self) end def to_composite_ids Array.new(self) end end class CompositeKeys < Array def to_s # Doing this makes it easier to parse Base#[](attr_name) join(ID_SEP) end end end Array.send(:include, CompositePrimaryKeys::ArrayExtension)
Version data entries
7 entries across 7 versions & 1 rubygems