Class: Agave::Utils::SeoTagsBuilder
- Inherits:
-
Object
- Object
- Agave::Utils::SeoTagsBuilder
- Defined in:
- lib/agave/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.
33 34 35 36 |
# File 'lib/agave/utils/seo_tags_builder.rb', line 33 def initialize(item, site) @item = item @site = site end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
31 32 33 |
# File 'lib/agave/utils/seo_tags_builder.rb', line 31 def item @item end |
#site ⇒ Object (readonly)
Returns the value of attribute site.
31 32 33 |
# File 'lib/agave/utils/seo_tags_builder.rb', line 31 def site @site end |
Instance Method Details
#meta_tags ⇒ Object
38 39 40 41 42 |
# File 'lib/agave/utils/seo_tags_builder.rb', line 38 def META_TAGS.map do |klass| klass.new(item, site).build end.flatten.compact end |