Class: Seorel::Helper::Generic

Inherits:
Base
  • Object
show all
Defined in:
lib/seorel/helper/generic.rb

Instance Attribute Summary

Attributes inherited from Base

#params, #request

Instance Method Summary collapse

Methods inherited from Base

#helpers, #image_url, #initialize, #locale, #render

Constructor Details

This class inherits a constructor from Seorel::Helper::Base

Instance Method Details

#allObject



22
23
24
25
26
27
28
# File 'lib/seorel/helper/generic.rb', line 22

def all
  [
    title_tag,
    description_tag,
    keywords_tag
  ].compact
end

#description_tagObject



13
14
15
# File 'lib/seorel/helper/generic.rb', line 13

def description_tag
  h.tag :meta, name: 'description', content: params.description
end

#keywords_tagObject



17
18
19
20
# File 'lib/seorel/helper/generic.rb', line 17

def keywords_tag
  return if params.keywords.blank?
  h.tag :meta, name: 'keywords', content: params.keywords
end

#title_tagObject



9
10
11
# File 'lib/seorel/helper/generic.rb', line 9

def title_tag
  h. :title, title
end