Class: Deklarativna::NestingRenderable
- Inherits:
-
Renderable
- Object
- Renderable
- Deklarativna::NestingRenderable
- Defined in:
- lib/deklarativna_core.rb
Overview
Public Class This class is intended to render tags following the ‘<tagname></tagname>’ pattern
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Attributes inherited from Renderable
Instance Method Summary collapse
Methods inherited from Renderable
#initialize, #render_attributes
Constructor Details
This class inherits a constructor from Deklarativna::Renderable
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
30 31 32 |
# File 'lib/deklarativna_core.rb', line 30 def content @content end |
Instance Method Details
#_proc_call ⇒ Object
43 44 45 46 47 48 |
# File 'lib/deklarativna_core.rb', line 43 def _proc_call if @content.call.respond_to? :join return @content.call.join("") end @content.call end |
#proc_call ⇒ Object
36 37 38 39 40 41 |
# File 'lib/deklarativna_core.rb', line 36 def proc_call if @content.nil? return "" end _proc_call end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/deklarativna_core.rb', line 32 def to_s "<#{@tag_name}#{render_attributes}>#{proc_call}</#{@tag_name}>" end |