Class: XRay::HTML::Document
Constant Summary
Constants inherited from Element
Element::CLASS, Element::ID, Element::PROP, Element::PROP_PAIR, Element::WORD
Instance Attribute Summary
Attributes inherited from Element
#children, #close_type, #ending, #parent, #props, #scopes, #tag
Instance Method Summary collapse
- #==(other) ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(children = []) ⇒ Document
constructor
A new instance of Document.
Methods inherited from Element
#auto_close?, #closed?, #each, #has_prop?, #has_scope?, #in_scope?, #inline?, #inner_html, #inner_text, #match?, #outer_html, #prop, #prop_text, #prop_value, #query, #self_closed?, #tag_name, #tag_name_equal?, #to_s
Constructor Details
Instance Method Details
#==(other) ⇒ Object
158 159 160 161 162 163 164 165 166 |
# File 'lib/html/struct.rb', line 158 def ==(other) if other.is_a?(Array) return children == other elsif other.is_a?(Document) return children == other.children else super end end |
#empty? ⇒ Boolean
168 169 170 |
# File 'lib/html/struct.rb', line 168 def empty? children.empty? end |