Class: Cloudpress::Renderers::Tag
- Inherits:
-
Object
- Object
- Cloudpress::Renderers::Tag
- Defined in:
- lib/cloudpress/renderers/tag.rb
Instance Attribute Summary collapse
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(context, tag) ⇒ Tag
constructor
A new instance of Tag.
- #render ⇒ Object
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
#tag ⇒ Object (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
#render ⇒ Object
12 13 14 |
# File 'lib/cloudpress/renderers/tag.rb', line 12 def render @context.render(partial: 'cloudpress/tags/tag', locals: {renderer: self}) end |