Class: Dato::Utils::SeoTagsBuilder
- Inherits:
-
Object
- Object
- Dato::Utils::SeoTagsBuilder
- Defined in:
- lib/dato/utils/seo_tags_builder.rb
Constant Summary collapse
- META_TAGS =
[ MetaTags::Title, MetaTags::Description, MetaTags::Image, MetaTags::Robots, MetaTags::OgLocale, MetaTags::OgType, MetaTags::OgSiteName, MetaTags::ArticleModifiedTime, MetaTags::ArticlePublisher, MetaTags::TwitterCard, MetaTags::TwitterSite, ].freeze
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#site ⇒ Object
readonly
Returns the value of attribute site.
Instance Method Summary collapse
-
#initialize(item, site) ⇒ SeoTagsBuilder
constructor
A new instance of SeoTagsBuilder.
- #meta_tags ⇒ Object
Constructor Details
#initialize(item, site) ⇒ SeoTagsBuilder
Returns a new instance of SeoTagsBuilder.
34 35 36 37 |
# File 'lib/dato/utils/seo_tags_builder.rb', line 34 def initialize(item, site) @item = item @site = site end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
32 33 34 |
# File 'lib/dato/utils/seo_tags_builder.rb', line 32 def item @item end |
#site ⇒ Object (readonly)
Returns the value of attribute site.
32 33 34 |
# File 'lib/dato/utils/seo_tags_builder.rb', line 32 def site @site end |
Instance Method Details
#meta_tags ⇒ Object
39 40 41 42 43 |
# File 'lib/dato/utils/seo_tags_builder.rb', line 39 def META_TAGS.map do |klass| klass.new(item, site).build end.flatten.compact end |