Module: Blocks
- Defined in:
- lib/blocks.rb,
lib/blocks/base.rb,
lib/blocks/container.rb,
lib/blocks/proc_with_args.rb,
lib/blocks/view_additions.rb,
lib/blocks/controller_additions.rb
Defined Under Namespace
Modules: ControllerAdditions, ViewAdditions Classes: Base, Container, ProcWithArgs
Constant Summary collapse
- @@template_folder =
"blocks"- @@use_partials =
false- @@surrounding_tag_surrounds_before_and_after_blocks =
false
Class Method Summary collapse
-
.render_template(view, partial, options = {}, &block) ⇒ Object
Shortcut for using the templating feature / rendering templates.
-
.setup {|_self| ... } ⇒ Object
Default way to setup Blocks.
Class Method Details
.render_template(view, partial, options = {}, &block) ⇒ Object
Shortcut for using the templating feature / rendering templates
21 22 23 |
# File 'lib/blocks.rb', line 21 def self.render_template(view, partial, ={}, &block) Blocks::Base.new(view, ).render_template(partial, &block) end |
.setup {|_self| ... } ⇒ Object
Default way to setup Blocks
26 27 28 |
# File 'lib/blocks.rb', line 26 def self.setup yield self end |