You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, when SuperDiff is constructing a diff for two instances of the same PORO, it will list each instance variable in the class along with its value. As SuperDiff inspects values recursively, in certain cases this diff may unhelpfully produce a lot of output. To mitigate this, you can give your PORO class an attributes_for_super_diff method. SuperDiff will then use this method to list key/value pairs instead.
This fact is buried in the gem. In the absence of extensive documentation we should probably mention it the README, under the Configuration section. It might also be good to recommend implementing ==, since if you're implementing attributes_for_super_diff you probably also want to implement ==.
The text was updated successfully, but these errors were encountered:
By default, when SuperDiff is constructing a diff for two instances of the same PORO, it will list each instance variable in the class along with its value. As SuperDiff inspects values recursively, in certain cases this diff may unhelpfully produce a lot of output. To mitigate this, you can give your PORO class an
attributes_for_super_diff
method. SuperDiff will then use this method to list key/value pairs instead.This fact is buried in the gem. In the absence of extensive documentation we should probably mention it the README, under the Configuration section. It might also be good to recommend implementing
==
, since if you're implementingattributes_for_super_diff
you probably also want to implement==
.The text was updated successfully, but these errors were encountered: