# File lib/dm-core/support/equalizer.rb, line 11 11: def define_eql_method(methods) 12: class_eval def eql?(other) return true if equal?(other) instance_of?(other.class) && #{methods.map { |method| "#{method}.eql?(other.#{method})" }.join(' && ')} end, __FILE__, __LINE__ + 1 13: end
# File lib/dm-core/support/equalizer.rb, line 21 21: def define_equivalent_method(methods) 22: respond_to = [] 23: equivalent = [] 24: 25: methods.each do |method| 26: respond_to << "other.respond_to?(#{method.inspect})" 27: equivalent << "#{method} == other.#{method}" 28: end 29: 30: class_eval def ==(other) return true if equal?(other) return false unless kind_of?(other.class) || other.kind_of?(self.class) #{respond_to.join(' && ')} && #{equivalent.join(' && ')} end, __FILE__, __LINE__ + 1 31: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.