Class: Duxml::GrammarClass

Inherits:
Object show all
Extended by:
Forwardable
Includes:
Grammar
Defined in:
lib/duxml/meta/grammar.rb

Overview

contains Duxml::Rules and can apply them by validating XML or qualifying user input reporting Duxml::Errors to History as needed

Constant Summary

Constants included from Duxml

DITA_GRAMMAR

Constants included from Meta

Meta::FILE_EXT

Instance Attribute Summary collapse

Attributes included from Duxml

#doc, #file, #meta

Attributes included from Saxer

#io

Instance Method Summary collapse

Methods included from Grammar

#add_observer, #defined?, #description, #get_rule, #history, import, #inspect, #name, #qualify, #validate, xml

Methods included from RelaxNG

#relaxng

Methods included from Duxml

#create, #load, #log, #relaxng, #save, #validate

Methods included from Meta

#grammar=, meta_path, xml

Methods included from Saxer

#sax

Methods included from LazyOx

#method_missing

Methods included from PatternMaker

#get_child_patterns, #get_existing_attr_patterns, #get_null_attr_patterns, #get_null_child_patterns, #get_relationships

Methods included from Spreadsheet

sheet_to_xml

Methods included from Reportable

#add_observer

Constructor Details

#initialize(rules = []) ⇒ GrammarClass



31
32
33
# File 'lib/duxml/meta/grammar.rb', line 31

def initialize(rules=[])
  @rules = rules
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Duxml::LazyOx

Instance Attribute Details

#rulesObject (readonly) Also known as: nodes

Returns the value of attribute rules.



36
37
38
# File 'lib/duxml/meta/grammar.rb', line 36

def rules
  @rules
end