Sha256: 4c530c7b02b80f299c63bdb501f1b8ec3c6b497cf4effd39524731f04b556f25
Contents?: true
Size: 329 Bytes
Versions: 28
Compression:
Stored size: 329 Bytes
Contents
# frozen_string_literal: true class FormattedString < String attr_reader :fragments def initialize fragments super [].tap {|accum| (@fragments = fragments).each {|it| accum << it[:text] } }.join end def eql? other super && (FormattedString === other ? (@fragments ||= nil) == other.fragments : true) end end
Version data entries
28 entries across 28 versions & 1 rubygems