Class: Tumblargh::Renderer::Tag

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

Direct Known Subclasses

CustomTag

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

#renderObject



4
5
6
7
8
# File 'lib/tumblargh/renderer/tag.rb', line 4

def render
  # {PhotoURL-500} becomes photo_url(500)
  tag, *args = node[1].split('-')
  context.send tag.underscore, *args
end