-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to prevent anonymisation #25
Conversation
3f82952
to
0f1a1cf
Compare
0f1a1cf
to
e4bc8a8
Compare
This comment has been minimized.
This comment has been minimized.
e4bc8a8
to
97eacf2
Compare
I do like the idea of having I'm not 100% sold on the name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm going slightly cold on adding so many methods to the model when we include Anonymisable
. Don't have to fix on this PR but I reckon we might want to refactor this a bit...
97eacf2
to
81f8aa4
Compare
Agree with this and propose |
81f8aa4
to
e1d75f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
e1d75f1
to
9cc7e1e
Compare
Ah sorry @stephenbinns I switched from |
# @example | ||
# Anony::ModelConfig.new(Manager).apply(Manager.new) | ||
def apply(instance) | ||
raise Anony::SkippedException if @skip_filter && instance.instance_exec(&@skip_filter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I felt slightly funny about the mismatch between throwing an exception and the name skip
. On balance I think this is OK: the exception is the behaviour we want, and I can't think of a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until we reach 1.0 we can move these around as needed.
In some circumstances, we don't want to anonymise a record (for example, imagine a record which is shared amongst multiple users). This PR introduces that interface.