Class: Sawtooth::Rules::DelegateRule::CallbacksRule
- Defined in:
- lib/sawtooth/rules/delegate_rule.rb
Instance Attribute Summary collapse
-
#delegate ⇒ Object
readonly
Returns the value of attribute delegate.
Instance Method Summary collapse
- #finish(path, doc, node) ⇒ Object
-
#initialize(delegate) ⇒ CallbacksRule
constructor
A new instance of CallbacksRule.
- #start(path, doc, node) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(delegate) ⇒ CallbacksRule
Returns a new instance of CallbacksRule.
17 |
# File 'lib/sawtooth/rules/delegate_rule.rb', line 17 def initialize(delegate); @delegate = delegate end |
Instance Attribute Details
#delegate ⇒ Object (readonly)
Returns the value of attribute delegate.
15 16 17 |
# File 'lib/sawtooth/rules/delegate_rule.rb', line 15 def delegate @delegate end |
Instance Method Details
#finish(path, doc, node) ⇒ Object
23 24 25 26 |
# File 'lib/sawtooth/rules/delegate_rule.rb', line 23 def finish(path, doc, node) rule = @delegate.rules && @delegate.rules.find('@document:after') rule.finish(path, doc, node) if rule && rule.respond_to?(:finish) end |
#start(path, doc, node) ⇒ Object
18 19 20 21 |
# File 'lib/sawtooth/rules/delegate_rule.rb', line 18 def start(path, doc, node) rule = @delegate.rules && @delegate.rules.find('@document:before') rule.start(path, doc, node) if rule && rule.respond_to?(:start) end |