class Jekyll::Lilypond::LilypondTag
Public Class Methods
new(_, argtext, _)
click to toggle source
Calls superclass method
# File lib/jekyll-lilypond/lilypond_tag.rb, line 4 def initialize(_, argtext, _) super @attributes = parse_attributes(argtext) end
Public Instance Methods
parse_attributes(text)
click to toggle source
# File lib/jekyll-lilypond/lilypond_tag.rb, line 9 def parse_attributes(text) attributes = {} text.scan(Liquid::TagAttributes) do |key, value| value=value.delete_prefix('"').delete_prefix("'") value=value.delete_suffix('"').delete_suffix("'") attributes[key] = value end attributes["attr_text"] = text attributes end
render(context)
click to toggle source
Calls superclass method
# File lib/jekyll-lilypond/lilypond_tag.rb, line 20 def render(context) content = super.strip site = context.registers[:site] tag = Tag.new(@attributes, content) tp = TagProcessor.new(site, tag) tp.run! tp.include end end