class Jekyll::Latex::Pdf::TempLiquid
Generates an environment where we temporarily can add new tags to the templet, without changing the registered tags.
Public Class Methods
register_tag(name, klass)
click to toggle source
# File lib/jekyll/latex/pdf/liquid.rb, line 47 def self.register_tag(name, klass) @@liquid_tags_register ||= {} @@liquid_tags_register[name.to_s] = klass end
run() { |s| ... }
click to toggle source
# File lib/jekyll/latex/pdf/liquid.rb, line 36 def self.run s = TempLiquid.new s.register_tags yield s s.restore_liquid_tags end
Public Instance Methods
register_tag(tag_key, tag_value)
click to toggle source
# File lib/jekyll/latex/pdf/liquid.rb, line 14 def register_tag(tag_key, tag_value) saved_liquid_tags[tag_key] = Liquid::Template.tags[tag_key] Liquid::Template.register_tag(tag_key, tag_value) end
tmp_keys()
click to toggle source
# File lib/jekyll/latex/pdf/liquid.rb, line 26 def tmp_keys @tmp_keys ||= [] end