Class: XRay::HTML::CommentElement
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
Methods inherited from Element
#each, #empty?, #has_prop?, #has_scope?, #in_scope?, #match?, #prop, #prop_text, #prop_value, #query, #self_closed?
Constructor Details
Returns a new instance of CommentElement.
205
206
207
208
|
# File 'lib/html/struct.rb', line 205
def initialize(text)
super(nil)
@text = text.to_s
end
|
Instance Method Details
#==(other) ⇒ Object
220
221
222
|
# File 'lib/html/struct.rb', line 220
def ==(other)
text == other.text
end
|
#auto_close? ⇒ Boolean
226
|
# File 'lib/html/struct.rb', line 226
def auto_close? ; false; end
|
#closed? ⇒ Boolean
227
|
# File 'lib/html/struct.rb', line 227
def closed? ; true; end
|
#content ⇒ Object
210
|
# File 'lib/html/struct.rb', line 210
def content; @text; end
|
#inline? ⇒ Boolean
225
|
# File 'lib/html/struct.rb', line 225
def inline? ; true; end
|
#outer_html ⇒ Object
216
217
218
|
# File 'lib/html/struct.rb', line 216
def outer_html
"<!--#{text}-->"
end
|
#tag_name ⇒ Object
211
|
# File 'lib/html/struct.rb', line 211
def tag_name; nil; end
|
#tag_name_equal?(name) ⇒ Boolean
224
|
# File 'lib/html/struct.rb', line 224
def tag_name_equal?(name); false; end
|
#to_s ⇒ Object
229
230
231
|
# File 'lib/html/struct.rb', line 229
def to_s
"[Comment: #{text}]"
end
|