Class: Duxml::RuleClass
- Inherits:
-
PatternClass
- Object
- PatternClass
- Duxml::RuleClass
- Includes:
- Rule
- Defined in:
- lib/duxml/meta/grammar/rule.rb
Overview
as an object, Rules consist of a subject, representing the XML Element, and a statement representing the Rule’s logic this class cannot be used alone and is rather subclassed, one for each type of possible XML changes
Direct Known Subclasses
AttrsRuleClass, ChildrenRuleClass, TextRuleClass, ValueRuleClass
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#statement ⇒ Object
readonly
Returns the value of attribute statement.
Attributes included from Reportable
Attributes inherited from PatternClass
Attributes included from Duxml
Attributes included from Saxer
Instance Method Summary collapse
-
#initialize(subj, _statement) ⇒ RuleClass
constructor
A new instance of RuleClass.
Methods included from Rule
#applies_to?, #description, #history, #qualify
Methods included from Reportable
Methods included from Pattern
#<=>, #abstract?, #concrete?, #description, #name, #relationship, #simple_name, #xml
Methods included from Duxml
Methods included from Saxer
Constructor Details
#initialize(subj, _statement) ⇒ RuleClass
Returns a new instance of RuleClass.
22 23 24 25 26 |
# File 'lib/duxml/meta/grammar/rule.rb', line 22 def initialize(subj, _statement) @statement = _statement @object = nil super subj end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
28 29 30 |
# File 'lib/duxml/meta/grammar/rule.rb', line 28 def object @object end |
#statement ⇒ Object (readonly)
Returns the value of attribute statement.
28 29 30 |
# File 'lib/duxml/meta/grammar/rule.rb', line 28 def statement @statement end |