Module: Isomorphic::Node::Internal::DeepEquals
Overview
Included when the base class needs to perform deep equality testing.
Instance Method Summary collapse
-
#all_attributes_eql?(base, object, attributes = ::ActiveSupport::HashWithIndifferentAccess.new) ⇒ Boolean
Are all attributes deep equal for the given object?.
Instance Method Details
#all_attributes_eql?(base, object, attributes = ::ActiveSupport::HashWithIndifferentAccess.new) ⇒ Boolean
Are all attributes deep equal for the given object?
76 77 78 79 80 81 82 83 84 |
# File 'lib/isomorphic/node.rb', line 76 def all_attributes_eql?(base, object, attributes = ::ActiveSupport::HashWithIndifferentAccess.new) attributes.try(:each_pair) do |pair| attribute_name, expected_value = *pair return false unless deep_eql?(base, expected_value, object.send(attribute_name)) end true end |