Skip to content

Commit

Permalink
[#7] Fix rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
malparty committed Jun 30, 2021
1 parent d30e668 commit 9be2612
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/services/google_service/parser_service.rb
Expand Up @@ -4,7 +4,7 @@ module GoogleService
class ParserService
require 'nokogiri'

@@non_ads_result_selector = 'a[data-ved]:not([role]):not([jsaction]):not(.adwords):not(.footer-links)'
NON_ADS_RESULT_SELECTOR = 'a[data-ved]:not([role]):not([jsaction]):not(.adwords):not(.footer-links)'

def initialize(html)
@html = html
Expand Down Expand Up @@ -45,16 +45,16 @@ def ads_page_url
end

def non_ads_result_count
@document.css(@@non_ads_result_selector).count
@document.css(NON_ADS_RESULT_SELECTOR).count
end

def non_ads_url
@document.css(@@non_ads_result_selector).map { |a_tag| a_tag['href'] }
@document.css(NON_ADS_RESULT_SELECTOR).map { |a_tag| a_tag['href'] }
end

def total_link_count
Rails.logger.info 'Counter HERE!!!'
@document.css('a').map { | a_tag | Rails.logger.info a_tag['href'] }
@document.css('a').map { |a_tag| Rails.logger.info a_tag['href'] }
@document.css('a').count
end
end
Expand Down

0 comments on commit 9be2612

Please sign in to comment.