In Files

  • rexml/doctype.rb

Class/Module Index [+]

Quicksearch

REXML::NotationDecl

Attributes

public[RW]
system[RW]

Public Class Methods

new(name, middle, pub, sys) click to toggle source
 
               # File rexml/doctype.rb, line 253
def initialize name, middle, pub, sys
  super(nil)
  @name = name
  @middle = middle
  @public = pub
  @system = sys
end
            

Public Instance Methods

name() click to toggle source

This method retrieves the name of the notation.

Method contributed by Henrik Martensson

 
               # File rexml/doctype.rb, line 283
def name
  @name
end
            
to_s() click to toggle source
 
               # File rexml/doctype.rb, line 261
def to_s
  c = nil
  c = parent.context if parent
  if c and c[:prologue_quote] == :apostrophe
    quote = "'"
  else
    quote = "\""
  end
  notation = "<!NOTATION #{@name} #{@middle}"
  notation << " #{quote}#{@public}#{quote}" if @public
  notation << " #{quote}#{@system}#{quote}" if @system
  notation << ">"
  notation
end
            
write( output, indent=-1 ) click to toggle source
 
               # File rexml/doctype.rb, line 276
def write( output, indent=-1 )
  output << to_s
end