emmanuel/aequitas — Issue #2: Support for class inheritance
Author: aemadrid
Created: 2012-01-24 05:25:54+00:00
State: open

It seems that aequitas does not support class inheritance. I was expecting class B to inherit class A rules. Is this something planned for the future?

[1] pry(main)> class A
[1] pry(main)* include Aequitas
[1] pry(main)* attr_accessor :name
[1] pry(main)* validates_presence_of :name
[1] pry(main)* end
=> ##<7f656317Aequitas::RuleSet {% skip_condition=#>}>}>
[2] pry(main)>
[3] pry(main)> class B < A
[3] pry(main)* attr_accessor :age
[3] pry(main)* validates_presence_of :age
[3] pry(main)* end
NameError: undefined local variable or method `rules' for #
from /Users/some_user/.rvm/gems/jruby-1.6.5@orientdb_model/bundler/gems/aequitas-e158693570e2/lib/aequitas/contextual_rule_set.rb:114:in `concat'