Class: Tumblargh::Renderer::CustomTag

Inherits:
Tag
  • Object
show all
Defined in:
lib/tumblargh/renderer/tag.rb

Direct Known Subclasses

ColorTag, FontTag, ImageTag, LangTag, TextTag

Instance Attribute Summary

Attributes inherited from Base

#context, #node, #options

Instance Method Summary collapse

Methods inherited from Base

#context_post, contextual_tag, #escape_html, #escape_url, #initialize, #method_missing, #strip_html

Constructor Details

This class inherits a constructor from Tumblargh::Renderer::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Tumblargh::Renderer::Base

Instance Method Details

#method_nameObject



12
13
14
# File 'lib/tumblargh/renderer/tag.rb', line 12

def method_name
  self.class.name.demodulize.sub('Tag', '').downcase
end

#renderObject



16
17
18
# File 'lib/tumblargh/renderer/tag.rb', line 16

def render
  context.send(method_name, node[1].split(':').last)
end