Alex Zakruzhetskyi Alex Zakruzhetskyi - 4 months ago 39
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.