Class: Hatemile::Util::Html::HTMLDOMElement Abstract

Inherits:
HTMLDOMNode
  • Object
show all
Defined in:
lib/hatemile/util/html/html_dom_element.rb

Overview

This class is abstract.

The HTMLDOMElement interface contains the methods for access of the HTML element.

Direct Known Subclasses

NokogiriLib::NokogiriHTMLDOMElement

Instance Method Summary collapse

Methods inherited from HTMLDOMNode

#append_text, #get_data, #get_parent_element, #get_text_content, #insert_after, #insert_before, #prepend_text, #remove_node, #replace_node, #set_data

Instance Method Details

#append_element(element) ⇒ Hatemile::Util::Html::HTMLDOMElement

This method is abstract.

Append a element child.

Parameters:

Returns:



101
102
103
# File 'lib/hatemile/util/html/html_dom_element.rb', line 101

def append_element(element)
  # Interface method
end

#clone_elementHatemile::Util::Html::HTMLDOMElement

This method is abstract.

Clone this element.

Returns:



228
229
230
# File 'lib/hatemile/util/html/html_dom_element.rb', line 228

def clone_element
  # Interface method
end

#get_attribute(name) ⇒ String

This method is abstract.

Returns the value of a attribute.

Parameters:

  • name (String)

    The name of attribute.

Returns:

  • (String)

    The value of the attribute or nil if the element not contains the attribute.



48
49
50
# File 'lib/hatemile/util/html/html_dom_element.rb', line 48

def get_attribute(name)
  # Interface method
end

#get_childrenArray<Hatemile::Util::Html::HTMLDOMNode>

This method is abstract.

Returns the children of this element.

Returns:



132
133
134
# File 'lib/hatemile/util/html/html_dom_element.rb', line 132

def get_children
  # Interface method
end

#get_children_elementsArray<Hatemile::Util::Html::HTMLDOMElement>

This method is abstract.

Returns the elements children of this element.

Returns:



122
123
124
# File 'lib/hatemile/util/html/html_dom_element.rb', line 122

def get_children_elements
  # Interface method
end

#get_first_element_childHatemile::Util::Html::HTMLDOMElement

This method is abstract.

Returns the first element child of this element.

Returns:



189
190
191
# File 'lib/hatemile/util/html/html_dom_element.rb', line 189

def get_first_element_child
  # Interface method
end

#get_first_node_childHatemile::Util::Html::HTMLDOMNode

This method is abstract.

Returns the first node child of this element.

Returns:



209
210
211
# File 'lib/hatemile/util/html/html_dom_element.rb', line 209

def get_first_node_child
  # Interface method
end

#get_inner_htmlString

This method is abstract.

Returns the inner HTML code of this element.

Returns:

  • (String)

    The inner HTML code of this element.



170
171
172
# File 'lib/hatemile/util/html/html_dom_element.rb', line 170

def get_inner_html
  # Interface method
end

#get_last_element_childHatemile::Util::Html::HTMLDOMElement

This method is abstract.

Returns the last element child of this element.

Returns:



199
200
201
# File 'lib/hatemile/util/html/html_dom_element.rb', line 199

def get_last_element_child
  # Interface method
end

#get_last_node_childHatemile::Util::Html::HTMLDOMNode

This method is abstract.

Returns the last node child of this element.

Returns:



219
220
221
# File 'lib/hatemile/util/html/html_dom_element.rb', line 219

def get_last_node_child
  # Interface method
end

#get_outer_htmlString

This method is abstract.

Returns the HTML code of this element.

Returns:

  • (String)

    The HTML code of this element.



179
180
181
# File 'lib/hatemile/util/html/html_dom_element.rb', line 179

def get_outer_html
  # Interface method
end

#get_tag_nameString

This method is abstract.

Returns the tag name of element.

Returns:

  • (String)

    The tag name of element in uppercase letters.



37
38
39
# File 'lib/hatemile/util/html/html_dom_element.rb', line 37

def get_tag_name
  # Interface method
end

#has_attribute?(name) ⇒ Boolean

This method is abstract.

Check that the element has an attribute.

Parameters:

  • name (String)

    The name of attribute.

Returns:

  • (Boolean)

    True if the element has the attribute or false if the element not has the attribute.



80
81
82
# File 'lib/hatemile/util/html/html_dom_element.rb', line 80

def has_attribute?(name)
  # Interface method
end

#has_attributes?Boolean

This method is abstract.

Check that the element has attributes.

Returns:

  • (Boolean)

    True if the element has attributes or false if the element not has attributes.



90
91
92
# File 'lib/hatemile/util/html/html_dom_element.rb', line 90

def has_attributes?
  # Interface method
end

#has_children?Boolean

This method is abstract.

Check that the element has children.

Returns:

  • (Boolean)

    True if the element has children or false if the element not has children.



161
162
163
# File 'lib/hatemile/util/html/html_dom_element.rb', line 161

def has_children?
  # Interface method
end

#has_children_elements?Boolean

This method is abstract.

Check that the element has elements children.

Returns:

  • (Boolean)

    True if the element has elements children or false if the element not has elements children.



151
152
153
# File 'lib/hatemile/util/html/html_dom_element.rb', line 151

def has_children_elements?
  # Interface method
end

#normalizeHatemile::Util::Html::HTMLDOMElement

This method is abstract.

Joins adjacent Text nodes.

Returns:



141
142
143
# File 'lib/hatemile/util/html/html_dom_element.rb', line 141

def normalize
  # Interface method
end

#prepend_element(element) ⇒ Hatemile::Util::Html::HTMLDOMElement

This method is abstract.

Prepend a element child.

Parameters:

Returns:



112
113
114
# File 'lib/hatemile/util/html/html_dom_element.rb', line 112

def prepend_element(element)
  # Interface method
end

#remove_attribute(name) ⇒ void

This method is abstract.

This method returns an undefined value.

Remove a attribute of element.

Parameters:

  • name (String)

    The name of attribute.



69
70
71
# File 'lib/hatemile/util/html/html_dom_element.rb', line 69

def remove_attribute(name)
  # Interface method
end

#set_attribute(name, value) ⇒ void

This method is abstract.

This method returns an undefined value.

Create or modify a attribute.

Parameters:

  • name (String)

    The name of attribute.

  • value (String)

    The value of attribute.



59
60
61
# File 'lib/hatemile/util/html/html_dom_element.rb', line 59

def set_attribute(name, value)
  # Interface method
end