Class: Jekyll::Secinfo::CweTag

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll-secinfo/cwe.rb

Instance Method Summary collapse

Constructor Details

#initialize(tagName, text, tokens) ⇒ CweTag

Returns a new instance of CweTag.



31
32
33
34
# File 'lib/jekyll-secinfo/cwe.rb', line 31

def initialize(tagName, text, tokens)
  super
  @text = text
end

Instance Method Details

#render(context) ⇒ Object



36
37
38
39
40
41
# File 'lib/jekyll-secinfo/cwe.rb', line 36

def render(context)
  cwe_text = @text.strip
  out = Cwe.to_link(cwe_text, context["site"], context["page"])
  return out if out
  return @text
end