Class: Nucleo::Models::FeedTypes::Seo::Page::SeoSummary

Inherits:
Base
  • Object
show all
Defined in:
lib/nucleo/models/feed_types/seo/page/seo_summary.rb

Instance Method Summary collapse

Methods inherited from Base

#check_count, #checks, #element, #element_content, #element_content?, #find_content, #points

Methods inherited from Base

#<=>, #analytics_category?, #category, #children, #children?, #context, #executed_at, #id, #initialize, #page, #page?, #page_context?, #page_recommendation_id, #record_id, #seo_category?, #site_analytic_id, #site_context?, #site_id, #status, #type

Constructor Details

This class inherits a constructor from Nucleo::Models::FeedTypes::Base

Instance Method Details

#issue_countInteger

Returns the count of issues (children recommendations)

Returns:

  • (Integer)


44
45
46
# File 'lib/nucleo/models/feed_types/seo/page/seo_summary.rb', line 44

def issue_count
  data['issue_count'].to_i
end

#page_rankNucleo::Models::PageRank

Returns an instance of the PageRank domain model



24
25
26
27
28
29
30
31
# File 'lib/nucleo/models/feed_types/seo/page/seo_summary.rb', line 24

def page_rank
  params = {
    'rank'     => data['page_rank'],
    'rank_max' => data['page_rank_max']
  }

  Nucleo::Models::PageRank.new(params)
end

#page_viewsInteger Also known as: pageviews

Returns the number of page views

Returns:

  • (Integer)


36
37
38
# File 'lib/nucleo/models/feed_types/seo/page/seo_summary.rb', line 36

def page_views
  data['page_views'].to_i
end

#seo_scoreNucleo::Models::SeoScore

Returns an instance of the SeoScore domain model



12
13
14
15
16
17
18
19
# File 'lib/nucleo/models/feed_types/seo/page/seo_summary.rb', line 12

def seo_score
  params = {
    'score' => data['seo_score'],
    'grade' => data['seo_grade']
  }

  Nucleo::Models::SeoScore.new(params)
end