Alistair Grant wrote:
Hi Herby,

On 8 February 2018 at 03:10, Herbert Vojčík<>  wrote:

Do you think it would be reasonable to have, a la "generate accessors" /
"generate initialize method", a "generate equality" thingie that would
generate #= and #hash for the method, mechanically?

Just created a new "piece of data" class and felt like it would be helpful.

The refactoring browser is already capable of generating #= and #hash:

Now somebody tell me it actually is there in the Nautilus menu, I just did not find it. Which would be the best outcome, save making myself ridiculous online... :-)

| r |

r := RBGenerateEqualHashRefactoring
         className: MyClass
         variables: #(vars which should be used in equal and hash).
r execute


Reply via email to