Class: Jekyll::PlannerTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::PlannerTag
- Defined in:
- lib/jekyll-plannertags.rb
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ PlannerTag
constructor
A new instance of PlannerTag.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ PlannerTag
Returns a new instance of PlannerTag.
6 7 8 9 |
# File 'lib/jekyll-plannertags.rb', line 6 def initialize(tag_name, text, tokens) super @text = text end |
Instance Method Details
#render(context) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/jekyll-plannertags.rb', line 11 def render(context) #Split by space = @text.split(' ') result = "tags: " .each do |tag| result = "#{result} <a href=\"/ref/planners/tags/#{tag}\">#{tag}</a>" end result end |