Class: SeoHelper::Configuration
- Inherits:
-
Object
- Object
- SeoHelper::Configuration
- Defined in:
- lib/seo_helper/configuration.rb
Instance Attribute Summary collapse
-
#default_page_description ⇒ Object
Returns the value of attribute default_page_description.
-
#default_page_image ⇒ Object
Returns the value of attribute default_page_image.
-
#default_page_keywords ⇒ Object
Returns the value of attribute default_page_keywords.
-
#pagination_formatter ⇒ Object
Returns the value of attribute pagination_formatter.
-
#site_name ⇒ Object
Returns the value of attribute site_name.
-
#site_name_formatter ⇒ Object
Returns the value of attribute site_name_formatter.
-
#skip_blank ⇒ Object
Returns the value of attribute skip_blank.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/seo_helper/configuration.rb', line 14 def initialize # Set default site_name according to the Rails application class name self.site_name = ::Rails.application.class.to_s.split("::").first self.skip_blank = true self.default_page_description = "" self.default_page_keywords = "" self.default_page_image = "" self.pagination_formatter = lambda {|title, page_number| "#{title} - Page #{page_number}" } self.site_name_formatter = lambda {|text, site_name| "#{text} | #{site_name}"} end |
Instance Attribute Details
#default_page_description ⇒ Object
Returns the value of attribute default_page_description.
5 6 7 |
# File 'lib/seo_helper/configuration.rb', line 5 def default_page_description @default_page_description end |
#default_page_image ⇒ Object
Returns the value of attribute default_page_image.
7 8 9 |
# File 'lib/seo_helper/configuration.rb', line 7 def default_page_image @default_page_image end |
#default_page_keywords ⇒ Object
Returns the value of attribute default_page_keywords.
6 7 8 |
# File 'lib/seo_helper/configuration.rb', line 6 def default_page_keywords @default_page_keywords end |
#pagination_formatter ⇒ Object
Returns the value of attribute pagination_formatter.
11 12 13 |
# File 'lib/seo_helper/configuration.rb', line 11 def pagination_formatter @pagination_formatter end |
#site_name ⇒ Object
Returns the value of attribute site_name.
3 4 5 |
# File 'lib/seo_helper/configuration.rb', line 3 def site_name @site_name end |
#site_name_formatter ⇒ Object
Returns the value of attribute site_name_formatter.
12 13 14 |
# File 'lib/seo_helper/configuration.rb', line 12 def site_name_formatter @site_name_formatter end |
#skip_blank ⇒ Object
Returns the value of attribute skip_blank.
9 10 11 |
# File 'lib/seo_helper/configuration.rb', line 9 def skip_blank @skip_blank end |