Module: Rulz::InstanceMethods
- Defined in:
- lib/rulz.rb
Instance Method Summary collapse
- #apply!(action, *args) ⇒ Object
- #apply_rules! ⇒ Object
- #condition_false?(name, *args) ⇒ Boolean
- #condition_true?(name, *args) ⇒ Boolean
Instance Method Details
#apply!(action, *args) ⇒ Object
29 30 31 |
# File 'lib/rulz.rb', line 29 def apply!(action, *args) Rulz::Evaluator::Action.new(self, action, *args).evaluate end |
#apply_rules! ⇒ Object
33 34 35 |
# File 'lib/rulz.rb', line 33 def apply_rules! Rulz::Rule.rules(self.class).each { |rule| rule.apply!(self) } end |
#condition_false?(name, *args) ⇒ Boolean
25 26 27 |
# File 'lib/rulz.rb', line 25 def condition_false?(name, *args) not condition_true?(name, *args) end |