module ScrapCbf::ElementNokogiri

This helper is a outliner. The purpose of this module is given a better interface for the object generate by Nokogiri. We can think as them as an extansion for the Nokogiri obj element. This module may disappear later.

Public Instance Methods

element_hidden?(element) click to toggle source
# File lib/scrap_cbf/helpers/lib/element_nokogiri.rb, line 9
def element_hidden?(element)
  element['style']&.eql?('display: none')
end
remove_whitespace(element) click to toggle source
# File lib/scrap_cbf/helpers/lib/element_nokogiri.rb, line 13
def remove_whitespace(element)
  element.text.gsub(/\s+/, '')
end