Module: SeoMetaBuilder
- Defined in:
- lib/seo_meta_builder.rb
Overview
Build localized titles and description for webpages
Instance Method Summary collapse
- #page_description ⇒ Object
- #page_title ⇒ Object
-
#set_page_description(hash, order = nil, type = :description) ⇒ Object
Set the page description with an hash of parameters.
-
#set_page_metas(hash, order = nil) ⇒ Object
Set title and description at the same time.
-
#set_page_title(hash, order = nil, type = :title) ⇒ Object
Set the page title with an hash of parameters.
Instance Method Details
#page_description ⇒ Object
91 92 93 |
# File 'lib/seo_meta_builder.rb', line 91 def page_description @page_description ||= (:description, , AutoOrder) end |
#page_title ⇒ Object
87 88 89 |
# File 'lib/seo_meta_builder.rb', line 87 def page_title @page_title ||= (:title, , 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 = (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 (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 = (type, hash, order) end |