Alex Zakruzhetskyi Alex Zakruzhetskyi - 3 months ago 32
Ruby Question

Is it possible not to get two last elements via nokogiri?

I want to take all

elements, using this code:

novelty.body = page.css('.rt-article p').text

but I don't want to get last two
elements. Is it possible to do?



page.css('.rt-article p').text.slice(0...-2)

Notice, there are three dots.