Class: REXML::DTD::NotationDecl
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::REXML::Child
|
|
Instance Chain:
self,
::REXML::Child,
::REXML::Node
|
|
Inherits: |
REXML::Child
|
Defined in: | lib/rexml/dtd/notationdecl.rb |
Constant Summary
-
PUBLIC =
# File 'lib/rexml/dtd/notationdecl.rb', line 7/^\s*#{START}\s(\w[\w-]*)\s(PUBLIC)\s+((["']).*?\4)\s*>/um
-
START =
# File 'lib/rexml/dtd/notationdecl.rb', line 5"<!NOTATION"
-
START_RE =
# File 'lib/rexml/dtd/notationdecl.rb', line 6/^\s*#{START}/um
-
SYSTEM =
# File 'lib/rexml/dtd/notationdecl.rb', line 8/^\s*#{START}\s(\w[\w-]*)\s(SYSTEM)\s+((["']).*?\4)\s*>/um
Class Method Summary
::REXML::Child - Inherited
.new | Constructor. |
Instance Attribute Summary
::REXML::Child - Inherited
#next_sibling | Alias for Node#next_sibling_node. |
#next_sibling= | Sets the next sibling of this child. |
#parent | The Parent of this object. |
#parent= | Sets the parent of this child to the supplied argument. |
#previous_sibling | Alias for Node#previous_sibling_node. |
#previous_sibling= | Sets the previous sibling of this child. |
::REXML::Node - Included
Instance Method Summary
::REXML::Child - Inherited
#bytes | This doesn't yet handle encodings. |
#document |
|
#remove | Removes this child from the parent. |
#replace_with | Replaces this object with another object. |
::REXML::Node - Included
#each_recursive | Visit all subnodes of |
#find_first_recursive | Find (and return) first subnode (recursively) for which the block evaluates to true. |
#indent, | |
#index_in_parent | Returns the position that |
#next_sibling_node, #previous_sibling_node, | |
#to_s |
|
Constructor Details
.new(src) ⇒ NotationDecl
# File 'lib/rexml/dtd/notationdecl.rb', line 9
def initialize src super() if src.match( PUBLIC ) md = src.match( PUBLIC, true ) elsif src.match( SYSTEM ) md = src.match( SYSTEM, true ) else raise ParseException.new( "error parsing notation: no matching pattern", src ) end @name = md[1] @middle = md[2] @rest = md[3] end
Class Method Details
.parse_source(source, listener)
[ GitHub ]# File 'lib/rexml/dtd/notationdecl.rb', line 32
def NotationDecl.parse_source source, listener md = source.match( PATTERN_RE, true ) thing = md[0].squeeze(" \t\n\r") listener.send inspect.downcase, thing end
Instance Method Details
#to_s
[ GitHub ]# File 'lib/rexml/dtd/notationdecl.rb', line 23
def to_s "<!NOTATION #@name #@middle #@rest>" end
#write(output, indent)
[ GitHub ]# File 'lib/rexml/dtd/notationdecl.rb', line 27
def write( output, indent ) indent( output, indent ) output << to_s end