Sha256: f2afe3391ff6d10becd73e9bedb609d7a72d7c4f302a4652a818d44cbce29240
Contents?: true
Size: 374 Bytes
Versions: 6
Compression:
Stored size: 374 Bytes
Contents
module Mandy class ArraySerializer SEPERATOR = '|' unless defined?(SEPERATOR) def initialize(items) @items = items || [] end def to_s @items.join(SEPERATOR) end def self.from_s(str) str.split(SEPERATOR) end def self.tuples_from_s(str) from_s(str).map {|s| Tuple.from_s(s) } end end end
Version data entries
6 entries across 6 versions & 1 rubygems