Module: Arachni::Parser::WithChildren
- Includes:
- Search
- Included in:
- Document, Nodes::Element
- Defined in:
- lib/arachni/parser/with_children.rb,
lib/arachni/parser/with_children/search.rb
Defined Under Namespace
Modules: Search
Instance Method Summary
collapse
Methods included from Search
#descendants, #nodes_by_attribute_name, #nodes_by_attribute_name_and_value, #nodes_by_class, #nodes_by_name, #nodes_by_names, #traverse
Instance Method Details
#<<(child) ⇒ Object
28
29
30
31
|
# File 'lib/arachni/parser/with_children.rb', line 28
def <<( child )
child.parent = self
children << child
end
|
17
18
19
|
# File 'lib/arachni/parser/with_children.rb', line 17
def children
@children ||= []
end
|
21
22
23
24
25
26
|
# File 'lib/arachni/parser/with_children.rb', line 21
def text
txt = children.find { |n| n.is_a? Parser::Nodes::Text }
return '' if !txt
txt.value
end
|