Class: REXML::Declaration

Inherits:
Child show all
Defined in:
lib/rexml/doctype.rb

Overview

This is an abstract class. You never use this directly; it serves as a parent class for the specific declarations.

Direct Known Subclasses

ElementDecl

Instance Attribute Summary

Attributes inherited from Child

#parent

Instance Method Summary collapse

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(src) ⇒ Declaration

Returns a new instance of Declaration.



205
206
207
208
# File 'lib/rexml/doctype.rb', line 205

def initialize src
  super()
  @string = src
end

Instance Method Details

#to_sObject



210
211
212
# File 'lib/rexml/doctype.rb', line 210

def to_s
  @string+'>'
end

#write(output, indent) ⇒ Object

DEPRECATED

See REXML::Formatters



217
218
219
# File 'lib/rexml/doctype.rb', line 217

def write( output, indent )
  output << to_s
end