Sha256: 586ed4cb04812a00e7a2f36d69ca92e4c696d61e9b9decbad162e803494f1f47
Contents?: true
Size: 430 Bytes
Versions: 5
Compression:
Stored size: 430 Bytes
Contents
module Mandy class Tuple SEPERATOR = ',' unless defined?(SEPERATOR) attr_accessor :name, :value def initialize(name, value) @name, @value = name, value end def to_s %(#{@name}#{SEPERATOR}#{@value}) end def self.from_s(str) new(*str.split(SEPERATOR)) end def ==(other) self.name == other.name && self.value == other.value end end end
Version data entries
5 entries across 5 versions & 1 rubygems