Class: Bunto::SeoTag

Inherits:
Liquid::Tag show all
Defined in:
lib/bunto-seo-tag.rb,
lib/bunto-seo-tag/version.rb

Constant Summary collapse

MINIFY_REGEX =
/([>,]\n|[%}]})\s+?(<|{[{%]|[ ]+\")/
VERSION =
'4.0.0'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_tag_name, text, _tokens) ⇒ SeoTag

Returns a new instance of SeoTag.



10
11
12
13
# File 'lib/bunto-seo-tag.rb', line 10

def initialize(_tag_name, text, _tokens)
  super
  @text = text
end

Instance Attribute Details

#contextObject

Returns the value of attribute context.



6
7
8
# File 'lib/bunto-seo-tag.rb', line 6

def context
  @context
end

Instance Method Details

#render(context) ⇒ Object



15
16
17
18
# File 'lib/bunto-seo-tag.rb', line 15

def render(context)
  @context = context
  template.render!(payload, info)
end