Class: Sawtooth::Rules::Base
- Inherits:
-
Object
- Object
- Sawtooth::Rules::Base
- Defined in:
- lib/sawtooth/rules/base.rb
Overview
Base Rule, provides three unimplemented methods, which can be overriden by more specific rules - like the create or call rule etc.
Direct Known Subclasses
CallRule, DelegateRule, DelegateRule::CallbacksRule, TextRule
Instance Method Summary collapse
-
#finish(path, document, node) ⇒ Object
Called when the end of a matching XML node is encountered.
-
#print_rule ⇒ Object
Basically calls inspect.
-
#start(path, document, node) ⇒ Object
Called when the beginning of a matching XML node is encountered.
Instance Method Details
#finish(path, document, node) ⇒ Object
Called when the end of a matching XML node is encountered. If an element has no body, this method is called with an empty string instead.
-
path, current (maybe rewritten) path
-
document, the current sawtooth parser stack (‘Sawtooth::Document`)
-
node, the current node
25 26 |
# File 'lib/sawtooth/rules/base.rb', line 25 def finish(path, document, node) end |
#print_rule ⇒ Object
Basically calls inspect
29 |
# File 'lib/sawtooth/rules/base.rb', line 29 def print_rule; self.class.name end |
#start(path, document, node) ⇒ Object
Called when the beginning of a matching XML node is encountered.
-
path, current (maybe rewritten) path
-
document, the current sawtooth parser stack (‘Sawtooth::Document`)
-
node, the current node to process
15 16 |
# File 'lib/sawtooth/rules/base.rb', line 15 def start(path, document, node) end |