class Triggerable::Rules::Rule
Attributes
actions[RW]
condition[RW]
model[RW]
name[RW]
Public Class Methods
new(model, options, block)
click to toggle source
# File lib/triggerable/rules/rule.rb, line 6 def initialize model, options, block @model = model @condition = Conditions::Condition.build(options[:if]) @name = options[:name] @actions = Triggerable::Actions::Action.build(block || options[:do]) end
Protected Instance Methods
debug?()
click to toggle source
# File lib/triggerable/rules/rule.rb, line 19 def debug? Triggerable::Engine.debug end
desc()
click to toggle source
# File lib/triggerable/rules/rule.rb, line 15 def desc "#{self.class.name} #{name || self}(#{model})" end