Class: ExpressTemplates::Markup::Wrapper
- Inherits:
-
Object
- Object
- ExpressTemplates::Markup::Wrapper
- Defined in:
- lib/express_templates/markup/wrapper.rb
Overview
wrap locals and helpers for evaluation during render
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #children ⇒ Object
- #compile ⇒ Object
-
#initialize(name, *args, &block) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #to_template ⇒ Object
Constructor Details
#initialize(name, *args, &block) ⇒ Wrapper
Returns a new instance of Wrapper.
8 9 10 11 12 |
# File 'lib/express_templates/markup/wrapper.rb', line 8 def initialize(name, *args, &block) @name = name @args = args @block_src = block ? block.source : nil end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
6 7 8 |
# File 'lib/express_templates/markup/wrapper.rb', line 6 def args @args end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/express_templates/markup/wrapper.rb', line 6 def name @name end |
Instance Method Details
#children ⇒ Object
23 24 25 |
# File 'lib/express_templates/markup/wrapper.rb', line 23 def children [] end |
#compile ⇒ Object
14 15 16 17 |
# File 'lib/express_templates/markup/wrapper.rb', line 14 def compile # insure nils do not blow up view %Q(%Q({{#{_compile}}})) end |
#to_template ⇒ Object
19 20 21 |
# File 'lib/express_templates/markup/wrapper.rb', line 19 def to_template _compile end |