lib/phlex/sgml/safe_value.rb

Lines

100%

11 of 11 covered

Branches

—

0 of 0 covered

Methods

100%

4 of 4 covered

1# frozen_string_literal: true
2
31class Phlex::SGML::SafeValue
41 include Phlex::SGML::SafeObject
5
61 def initialize(to_s)
71267 @to_s = to_s
8 end
9
101 attr_reader :to_s
11
121 def ==(other)
132 self.class == other.class && @to_s == other.to_s
14 end
15
161 def eql?(other)
176 self.class == other.class && @to_s.eql?(other.to_s)
18 end
19
201 def hash
21186 [self.class, @to_s].hash
22 end
23end