Class: NewsScraper::Transformers::Nokogiri::Functions

Inherits:
Object
  • Object
show all
Defined in:
lib/news_scraper/transformers/nokogiri/functions.rb

Instance Method Summary collapse

Instance Method Details

#string_join(nodeset, separator) ⇒ Object Also known as: string-join

Implements fn:string-join of XPath 2.0



8
9
10
# File 'lib/news_scraper/transformers/nokogiri/functions.rb', line 8

def string_join(nodeset, separator)
  nodeset.map(&:text).join(separator)
end