Module: Solid::LiquidExtensions::TagHighjacker
Instance Method Summary collapse
Instance Method Details
#load! ⇒ Object
41 42 43 44 45 |
# File 'lib/solid/liquid_extensions.rb', line 41 def load! original_tag = Liquid::Template.[tag_name.to_s] [tag_name] = original_tag unless .has_key?(tag_name) # avoid loosing reference to original class Liquid::Template.register_tag(tag_name, self) end |
#tag_name(name = nil) ⇒ Object
51 52 53 54 |
# File 'lib/solid/liquid_extensions.rb', line 51 def tag_name(name=nil) @tag_name = name unless name.nil? @tag_name end |
#unload! ⇒ Object
47 48 49 |
# File 'lib/solid/liquid_extensions.rb', line 47 def unload! Liquid::Template.register_tag(tag_name, [tag_name]) end |