Module: Aranha::Parsers::Html::Node::Default::NodesSupport

Defined in:
lib/aranha/parsers/html/node/default/nodes_support.rb

Instance Method Summary collapse

Instance Method Details

#node_set_value(node, xpath) ⇒ Nokogiri::XML::NodeSet

Parameters:

  • node (Nokogiri::XML::Node)
  • xpath (String)

Returns:

  • (Nokogiri::XML::NodeSet)


15
16
17
# File 'lib/aranha/parsers/html/node/default/nodes_support.rb', line 15

def node_set_value(node, xpath)
  node.xpath(xpath)
end

#node_value(node, xpath) ⇒ Nokogiri::XML::Node

Parameters:

  • node (Nokogiri::XML::Node)
  • xpath (String)

Returns:

  • (Nokogiri::XML::Node)


22
23
24
# File 'lib/aranha/parsers/html/node/default/nodes_support.rb', line 22

def node_value(node, xpath)
  node.at_xpath(xpath)
end