Class: REXML::NotationDecl
Instance Attribute Summary collapse
-
#public ⇒ Object
Returns the value of attribute public.
-
#system ⇒ Object
Returns the value of attribute system.
Attributes inherited from Child
Instance Method Summary collapse
-
#initialize(name, middle, pub, sys) ⇒ NotationDecl
constructor
A new instance of NotationDecl.
-
#name ⇒ Object
This method retrieves the name of the notation.
- #to_s ⇒ Object
- #write(output, indent = -1 )) ⇒ Object
Methods inherited from Child
#bytes, #document, #next_sibling=, #previous_sibling=, #remove, #replace_with
Methods included from Node
#each_recursive, #find_first_recursive, #indent, #index_in_parent, #next_sibling_node, #parent?, #previous_sibling_node
Constructor Details
#initialize(name, middle, pub, sys) ⇒ NotationDecl
Returns a new instance of NotationDecl.
250 251 252 253 254 255 256 |
# File 'lib/rexml/doctype.rb', line 250 def initialize name, middle, pub, sys super(nil) @name = name @middle = middle @public = pub @system = sys end |
Instance Attribute Details
#public ⇒ Object
Returns the value of attribute public.
249 250 251 |
# File 'lib/rexml/doctype.rb', line 249 def public @public end |
#system ⇒ Object
Returns the value of attribute system.
249 250 251 |
# File 'lib/rexml/doctype.rb', line 249 def system @system end |
Instance Method Details
#name ⇒ Object
This method retrieves the name of the notation.
Method contributed by Henrik Martensson
274 275 276 |
# File 'lib/rexml/doctype.rb', line 274 def name @name end |
#to_s ⇒ Object
258 259 260 261 262 263 264 |
# File 'lib/rexml/doctype.rb', line 258 def to_s "<!NOTATION #@name #@middle#{ @public ? ' ' + public.inspect : '' }#{ @system ? ' ' +@system.inspect : '' }>" end |
#write(output, indent = -1 )) ⇒ Object
266 267 268 269 |
# File 'lib/rexml/doctype.rb', line 266 def write( output, indent=-1 ) output << (' '*indent) if indent > 0 output << to_s end |