Class HTMLTree::Data
In: lib/html/element.rb
lib/html/xpath.rb
lib/html/element.rb
lib/html/xpath.rb
Parent: Object

This is a TreeElement that represents leaf data nodes (CDATA, scripts, comments, processing directives). It forwards unknown messages to the content element, so it otherwise behaves like a String.

Methods

Included Modules

TreeElement TreeElement

Public Class methods

parent_or_nil:parent, TreeElement or nil
str:contents, String
parent_or_nil:parent, TreeElement or nil
str:contents, String

Public Instance methods

Return my (empty) attributes Hash.

Return my (empty) attributes Hash.

Return false because I have no children.

Return false because I have no children.

Return an empty collection because I have no children.

Return an empty collection because I have no children.

Return true because I am a data Element.

Return true because I am a data Element.

Forward all other methods to my content, so I can otherwise behave like a String.

Forward all other methods to my content, so I can otherwise behave like a String.

Return my (empty) tag String.

Return my (empty) tag String.

Print me on the given IO stream.

Print me on the given IO stream.

[Validate]