Class: MetaTags::Renderer
- Inherits:
-
Object
- Object
- MetaTags::Renderer
- Defined in:
- lib/meta_tags/renderer.rb
Constant Summary collapse
- LINE_SEPARATOR =
"\n"
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
-
#vendors ⇒ Object
readonly
Returns the value of attribute vendors.
Instance Method Summary collapse
-
#initialize(template, vendors: nil) ⇒ Renderer
constructor
A new instance of Renderer.
- #render ⇒ Object
Constructor Details
#initialize(template, vendors: nil) ⇒ Renderer
Returns a new instance of Renderer.
9 10 11 12 |
# File 'lib/meta_tags/renderer.rb', line 9 def initialize(template, vendors: nil) @template = template @vendors = vendors end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
5 6 7 |
# File 'lib/meta_tags/renderer.rb', line 5 def template @template end |
#vendors ⇒ Object (readonly)
Returns the value of attribute vendors.
5 6 7 |
# File 'lib/meta_tags/renderer.rb', line 5 def vendors @vendors end |
Instance Method Details
#render ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/meta_tags/renderer.rb', line 14 def render [ charset_tag, title_tag, description_tag, keywords_tag, ].compact.join(LINE_SEPARATOR).html_safe end |