Class: Nucleo::Models::FeedTypes::Seo::Page::Base

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

Instance Method Summary collapse

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

#check_countObject



18
19
20
# File 'lib/nucleo/models/feed_types/seo/page/base.rb', line 18

def check_count
  checks.count
end

#checksArray

Returns the checks

Returns:

  • (Array)


14
15
16
# File 'lib/nucleo/models/feed_types/seo/page/base.rb', line 14

def checks
  Nucleo::Models::Checks.new(data.fetch('checks',[]))
end

#elementObject



22
23
24
# File 'lib/nucleo/models/feed_types/seo/page/base.rb', line 22

def element
  Nucleo::Models::Element.new(data.fetch('element',{}))
end

#element_contentObject



26
27
28
# File 'lib/nucleo/models/feed_types/seo/page/base.rb', line 26

def element_content
  self.element.content
end

#element_content?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/nucleo/models/feed_types/seo/page/base.rb', line 30

def element_content?
  self.element_content.present?
end

#find_contentObject



38
39
40
# File 'lib/nucleo/models/feed_types/seo/page/base.rb', line 38

def find_content
  self.checks.find_content
end

#pointsObject



34
35
36
# File 'lib/nucleo/models/feed_types/seo/page/base.rb', line 34

def points
  data.fetch('points', 0).to_i
end