Class: Fdlint::Parser::HTML::TextElement
- 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
#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
#initialize(text = "") ⇒ TextElement
Returns a new instance of TextElement.
235
236
237
238
|
# File 'lib/fdlint/parser/html/struct.rb', line 235
def initialize(text="")
super(nil)
@text = text.to_s
end
|
Instance Method Details
#==(other) ⇒ Object
251
252
253
|
# File 'lib/fdlint/parser/html/struct.rb', line 251
def ==(other)
text == other.text
end
|
#auto_close? ⇒ Boolean
257
|
# File 'lib/fdlint/parser/html/struct.rb', line 257
def auto_close? ; false; end
|
#closed? ⇒ Boolean
258
|
# File 'lib/fdlint/parser/html/struct.rb', line 258
def closed? ; true; end
|
#inline? ⇒ Boolean
256
|
# File 'lib/fdlint/parser/html/struct.rb', line 256
def inline?; true; end
|
#match?(query) ⇒ Boolean
247
248
249
|
# File 'lib/fdlint/parser/html/struct.rb', line 247
def match?( query )
false
end
|
241
|
# File 'lib/fdlint/parser/html/struct.rb', line 241
def tag_name; nil; end
|
#tag_name_equal?(name) ⇒ Boolean
255
|
# File 'lib/fdlint/parser/html/struct.rb', line 255
def tag_name_equal?(name); false; end
|
#text ⇒ Object
Also known as:
inner_text, inner_html, outer_html
240
|
# File 'lib/fdlint/parser/html/struct.rb', line 240
def text; @text; end
|
260
261
262
|
# File 'lib/fdlint/parser/html/struct.rb', line 260
def to_s
"[TEXT: #{text}]"
end
|