Sha256: 58c0ae929210fd3d7faf66df6e51d32ef89a54c42fd9fd73fac2b17848f3ff97
Contents?: true
Size: 365 Bytes
Versions: 33
Compression:
Stored size: 365 Bytes
Contents
module CompositePrimaryKeys ID_SEP = ',' ID_SET_SEP = ';' module ArrayExtension def to_composite_keys CompositeKeys.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
33 entries across 33 versions & 1 rubygems