File: rexml/dtd/elementdecl.rb

Overview
Module Structure
Class Hierarchy
Code

Overview

Module Structure

  module: <Toplevel Module>
  module: REXML#2
  module: DTD#3
  class: ElementDecl#4
inherits from
  Child ( REXML )
has properties
constant: START #5
constant: START_RE #6
constant: PATTERN_RE #7
method: initialize #11

Class Hierarchy

Object ( Builtin-Module )
Child ( REXML )
  ElementDecl ( REXML::DTD ) #4

Code

   1  require "rexml/child"
   2  module REXML
   3    module DTD
   4      class ElementDecl < Child
   5        START = "<!ELEMENT"
   6        START_RE = /^\s*#{START}/um
   7        PATTERN_RE = /^\s*(#{START}.*?)>/um
   8        PATTERN_RE = /^\s*#{START}\s+((?:[:\w_][-\.\w_]*:)?[-!\*\.\w_]*)(.*?)>/
   9        #\s*((((["']).*?\5)|[^\/'">]*)*?)(\/)?>/um, true)
  10 
  11        def initialize match
  12          @name = match[1]
  13          @rest = match[2]
  14        end
  15      end
  16    end
  17  end