Class: Trestle::ContainerHelper::Context
- Inherits:
-
Object
- Object
- Trestle::ContainerHelper::Context
- Defined in:
- app/helpers/trestle/container_helper.rb
Instance Method Summary collapse
-
#initialize(template) ⇒ Context
constructor
A new instance of Context.
- #sidebar(&block) ⇒ Object
Constructor Details
#initialize(template) ⇒ Context
Returns a new instance of Context.
14 15 16 |
# File 'app/helpers/trestle/container_helper.rb', line 14 def initialize(template) @template = template end |
Instance Method Details
#sidebar(&block) ⇒ Object
18 19 20 21 |
# File 'app/helpers/trestle/container_helper.rb', line 18 def (&block) @sidebar = @template.capture(&block) if block_given? @sidebar end |