Skip to content
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

Subclass can mutate superclass' filters #89

Closed
tfausak opened this issue Dec 18, 2013 · 0 comments
Closed

Subclass can mutate superclass' filters #89

tfausak opened this issue Dec 18, 2013 · 0 comments
Assignees
Labels

Comments

@tfausak
Copy link
Collaborator

tfausak commented Dec 18, 2013

9d6a26d#commitcomment-4896005

A = Class.new(ActiveInteraction::Base)
A.filters.map(&:name)
# => []
B = Class.new(A) { boolean :x }
A.filters.map(&:name)
# => [:x]
@ghost ghost assigned tfausak Dec 18, 2013
tfausak referenced this issue Dec 18, 2013
Class level instance vars are not copied by Ruby when you inherit. Each
class is given a new var to work with.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant