Class: Bemer::Tag
Instance Method Summary collapse
-
#initialize(block = '', element = nil, **options, &content) ⇒ Tag
constructor
A new instance of Tag.
- #render ⇒ Object
Constructor Details
#initialize(block = '', element = nil, **options, &content) ⇒ Tag
Returns a new instance of Tag.
9 10 11 12 13 |
# File 'lib/bemer/tag.rb', line 9 def initialize(block = '', element = nil, **, &content) @bem_cascade = [:bem_cascade] @tag_builder = TagBuilder.new(block, element, , &content) @renderer = Renderer.new end |
Instance Method Details
#render ⇒ Object
15 16 17 18 19 |
# File 'lib/bemer/tag.rb', line 15 def render tag_builder.content = capture_content renderer.render(tag_builder) end |