Class: Fdlint::Parser::HTML::CommentElement
- Inherits:
-
Tag
show all
- Defined in:
- lib/fdlint/parser/html/struct.rb
Constant Summary
Constants included
from Query
Query::CLASS, Query::ID, Query::PROP, Query::PROP_PAIR, Query::WORD
Instance Attribute Summary
Attributes inherited from Element
#children, #close_type, #ending, #parent, #position, #props, #scopes, #tag
Instance Method Summary
collapse
Methods included from Query
#match?, #query
Methods included from Matchable
#=~
Methods inherited from Element
#[], #each, #empty?, #has_prop?, #has_scope?, #in_scope?, #prop, #prop_text, #prop_value, #self_closed?, #stylesheet_link?, #top_level?
Constructor Details
Returns a new instance of CommentElement.
268
269
270
271
|
# File 'lib/fdlint/parser/html/struct.rb', line 268
def initialize(text)
super(nil)
@text = text.to_s
end
|
Instance Method Details
#==(other) ⇒ Object
283
284
285
|
# File 'lib/fdlint/parser/html/struct.rb', line 283
def ==(other)
text == other.text
end
|
#auto_close? ⇒ Boolean
289
|
# File 'lib/fdlint/parser/html/struct.rb', line 289
def auto_close? ; false; end
|
#closed? ⇒ Boolean
290
|
# File 'lib/fdlint/parser/html/struct.rb', line 290
def closed? ; true; end
|
273
|
# File 'lib/fdlint/parser/html/struct.rb', line 273
def content; @text; end
|
#inline? ⇒ Boolean
288
|
# File 'lib/fdlint/parser/html/struct.rb', line 288
def inline? ; true; end
|
#outer_html ⇒ Object
279
280
281
|
# File 'lib/fdlint/parser/html/struct.rb', line 279
def outer_html
"<!--#{text}-->"
end
|
274
|
# File 'lib/fdlint/parser/html/struct.rb', line 274
def tag_name; nil; end
|
#tag_name_equal?(name) ⇒ Boolean
287
|
# File 'lib/fdlint/parser/html/struct.rb', line 287
def tag_name_equal?(name); false; end
|
292
293
294
|
# File 'lib/fdlint/parser/html/struct.rb', line 292
def to_s
"[Comment: #{text}]"
end
|