Module: Nio::StateEquivalent
- Included in:
- DigitsDef, Fmt, NeutralNum, RepDec, RepDec::Opt, Rtnlzr
- Defined in:
- lib/nio/tools.rb
Instance Method Summary collapse
Instance Method Details
#==(obj) ⇒ Object
18 |
# File 'lib/nio/tools.rb', line 18 def ==(obj); test_equal(obj); end |
#===(obj) ⇒ Object
20 |
# File 'lib/nio/tools.rb', line 20 def ===(obj); test_equal(obj); end |
#eql?(obj) ⇒ Boolean
19 |
# File 'lib/nio/tools.rb', line 19 def eql?(obj); test_equal(obj); end |
#hash ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/nio/tools.rb', line 21 def hash h = 0 self.instance_variables.each do |var| v = self.instance_eval var.to_s h ^= v.hash unless v.nil? end h end |