Sha256: c231c63dbe7724d788ef1aa64663575bb134f5114b825ce49ef13e34f3126e20
Contents?: true
Size: 1.18 KB
Versions: 2
Compression:
Stored size: 1.18 KB
Contents
--- !ruby/object:RI::ClassDescription attributes: [] class_methods: - !ruby/object:RI::MethodSummary name: identify comment: - !ruby/struct:SM::Flow::H level: 1 text: Equatable - !ruby/struct:SM::Flow::P body: "This mixin provides methods of equality based on a single #identity method which must return a list of accessors used as the identity keys." - !ruby/struct:SM::Flow::P body: "It also provides a "shortcut" for creating the #identity method based on given accessors and returns the Equatable module for inclusion." - !ruby/struct:SM::Flow::VERB body: " include Equatable(:a, :b)\n" - !ruby/struct:SM::Flow::P body: "is equivalent to including a module containing:" - !ruby/struct:SM::Flow::VERB body: " def ==(other)\n self.a == other.a && self.b == other.b\n end\n\n def eql?(other)\n self.a.eql?(other.a) && self.b.eql?(other.b)\n end\n\n def hash()\n self.a.hash ^ self.b.hash\n end\n" constants: [] full_name: Equatable includes: [] instance_methods: - !ruby/object:RI::MethodSummary name: == - !ruby/object:RI::MethodSummary name: eql? - !ruby/object:RI::MethodSummary name: hash name: Equatable superclass:
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facets-2.4.2 | doc/ri/Equatable/cdesc-Equatable.yaml |
facets-2.4.3 | doc/ri/Equatable/cdesc-Equatable.yaml |