How do you detect if a Ruby instance has been changed after creation? -


how detect if ruby instance has been changed after creation?

i'm trying stay away known gems activemodel::dirty , writing lightweight solution return simple true or false if object's instance variables have been changed after point.

this regular ruby object, not rails object rails specific tools don't work.

i saw posts on hijacking attr_writer, didn't know if comprehensive , couldn't figure out how it.

can me? thanks.

afaik there's no lightweight solution this. possible hack write c extension plugs gc , checks if instance variable changed.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

android - Linear layout children not scrolling -

javascript - Create websocket without connecting -