Class: REXML::CSSSelector::Adapters::PrismAdapter
- Inherits:
-
BaseAdapter
- Object
- BaseAdapter
- REXML::CSSSelector::Adapters::PrismAdapter
show all
- Defined in:
- lib/rexml/css_selector/adapters/prism_adapter.rb
Defined Under Namespace
Classes: PrismDOM
Constant Summary
collapse
- INSTANCE =
INSTANCE is the default instance.
new
Instance Method Summary
collapse
Methods inherited from BaseAdapter
#checked?, #disabled?, #each_recursive_element, #empty?, #get_children_elements, #get_class_names, #get_element_index, #get_id, #get_namespace, #root?
Instance Method Details
#each_child_element(element) ⇒ Object
68
69
70
|
# File 'lib/rexml/css_selector/adapters/prism_adapter.rb', line 68
def each_child_element(element, &)
element.children.each(&)
end
|
#element?(node) ⇒ Boolean
44
45
46
|
# File 'lib/rexml/css_selector/adapters/prism_adapter.rb', line 44
def element?(node)
node.is_a?(PrismDOM)
end
|
#get_attribute(element, name, _namespace = nil, _attribute_name_case = :sensitive) ⇒ Object
52
53
54
|
# File 'lib/rexml/css_selector/adapters/prism_adapter.rb', line 52
def get_attribute(element, name, _namespace = nil, _attribute_name_case = :sensitive)
element.attribute(name)
end
|
#get_document_node(element) ⇒ Object
56
57
58
|
# File 'lib/rexml/css_selector/adapters/prism_adapter.rb', line 56
def get_document_node(element)
element.document
end
|
#get_parent_node(element) ⇒ Object
60
61
62
|
# File 'lib/rexml/css_selector/adapters/prism_adapter.rb', line 60
def get_parent_node(element)
element.parent
end
|
#get_previous_sibling_element(element) ⇒ Object
64
65
66
|
# File 'lib/rexml/css_selector/adapters/prism_adapter.rb', line 64
def get_previous_sibling_element(element)
element.previous_sibling
end
|
#get_tag_name(element) ⇒ Object
48
49
50
|
# File 'lib/rexml/css_selector/adapters/prism_adapter.rb', line 48
def get_tag_name(element)
element.type
end
|