Module: SeoMetaBuilder

Defined in:
lib/seo_meta_builder.rb

Overview

Build localized titles and description for webpages

Instance Method Summary collapse

Instance Method Details

#page_descriptionObject



91
92
93
# File 'lib/seo_meta_builder.rb', line 91

def page_description
  @page_description ||= page_meta_string_builder(:description, page_meta_auto_hash, AutoOrder)
end

#page_titleObject



87
88
89
# File 'lib/seo_meta_builder.rb', line 87

def page_title
  @page_title ||= page_meta_string_builder(:title, page_meta_auto_hash, AutoOrder)
end

#set_page_description(hash, order = nil, type = :description) ⇒ Object

Set the page description with an hash of parameters



17
18
19
# File 'lib/seo_meta_builder.rb', line 17

def set_page_description(hash, order = nil, type = :description)
  @page_description = page_meta_string_builder(type, hash, order)
end

#set_page_metas(hash, order = nil) ⇒ Object

Set title and description at the same time



6
7
8
9
# File 'lib/seo_meta_builder.rb', line 6

def set_page_metas(hash, order = nil)
  set_page_title(hash, order)
  set_page_description(hash, order)
end

#set_page_title(hash, order = nil, type = :title) ⇒ Object

Set the page title with an hash of parameters



12
13
14
# File 'lib/seo_meta_builder.rb', line 12

def set_page_title(hash, order = nil, type = :title)
  @page_title = page_meta_string_builder(type, hash, order)
end