Class: Cloudpress::Renderers::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudpress/renderers/tag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, tag) ⇒ Tag

Returns a new instance of Tag.



7
8
9
10
# File 'lib/cloudpress/renderers/tag.rb', line 7

def initialize(context, tag)
  @context = context
  @tag     = tag
end

Instance Attribute Details

#tagObject (readonly)

Returns the value of attribute tag.



5
6
7
# File 'lib/cloudpress/renderers/tag.rb', line 5

def tag
  @tag
end

Instance Method Details

#renderObject



12
13
14
# File 'lib/cloudpress/renderers/tag.rb', line 12

def render 
  @context.render(partial: 'cloudpress/tags/tag', locals: {renderer: self})
end