Class: NoCms::Seo::Presenters::SeoInfoPresenter
- Inherits:
-
Object
- Object
- NoCms::Seo::Presenters::SeoInfoPresenter
- Defined in:
- app/presenters/no_cms/seo/presenters/seo_info_presenter.rb
Instance Attribute Summary collapse
-
#base_presenter ⇒ Object
Returns the value of attribute base_presenter.
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
- #default_description ⇒ Object
- #default_no_follow? ⇒ Boolean
- #default_no_index? ⇒ Boolean
- #default_title ⇒ Object
- #description ⇒ Object
-
#initialize(object) ⇒ SeoInfoPresenter
constructor
A new instance of SeoInfoPresenter.
- #no_follow? ⇒ Boolean
- #no_index? ⇒ Boolean
- #title ⇒ Object
Constructor Details
#initialize(object) ⇒ SeoInfoPresenter
Returns a new instance of SeoInfoPresenter.
6 7 8 9 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 6 def initialize object self.object = object self.base_presenter = NoCms::Seo::Presenters::BasePresenter.new end |
Instance Attribute Details
#base_presenter ⇒ Object
Returns the value of attribute base_presenter.
4 5 6 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 4 def base_presenter @base_presenter end |
#object ⇒ Object
Returns the value of attribute object.
4 5 6 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 4 def object @object end |
Instance Method Details
#default_description ⇒ Object
23 24 25 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 23 def default_description base_presenter.description end |
#default_no_follow? ⇒ Boolean
39 40 41 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 39 def default_no_follow? false end |
#default_no_index? ⇒ Boolean
31 32 33 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 31 def default_no_index? false end |
#default_title ⇒ Object
15 16 17 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 15 def default_title base_presenter.title end |
#description ⇒ Object
19 20 21 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 19 def description self.object.seo_info.description.blank? ? default_description : self.object.seo_info.description end |
#no_follow? ⇒ Boolean
35 36 37 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 35 def no_follow? default_no_follow? || self.object.seo_info.no_follow? end |
#no_index? ⇒ Boolean
27 28 29 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 27 def no_index? default_no_index? || self.object.seo_info.no_index? end |
#title ⇒ Object
11 12 13 |
# File 'app/presenters/no_cms/seo/presenters/seo_info_presenter.rb', line 11 def title self.object.seo_info.title.blank? ? default_title : self.object.seo_info.title end |