class Nokogiri::XML::NodeSet
def inner_text
doc.css('d').map(&:text) # => ["foo", "bar"]
Instead, if you want to return the text of all nodes in the NodeSet:
doc.css('d').text # => "foobar"
doc = Nokogiri::XML('
Note: This joins the text of all Node objects in the NodeSet:
Get the inner text of all contained Node objects
##
def inner_text collect(&:inner_text).join("") end