Module: BuildingBlocks

Defined in:
lib/building_blocks.rb,
lib/building_blocks/base.rb,
lib/building_blocks/container.rb,
lib/building_blocks/view_additions.rb

Defined Under Namespace

Modules: ViewAdditions Classes: Base, Container

Constant Summary collapse

@@template_folder =
"blocks"
@@use_partials =
true
@@surrounding_tag_surrounds_before_and_after_blocks =
true

Class Method Summary collapse

Class Method Details

.render_template(view, partial, options = {}, &block) ⇒ Object

Shortcut for using the templating feature / rendering templates



18
19
20
# File 'lib/building_blocks.rb', line 18

def self.render_template(view, partial, options={}, &block)
  BuildingBlocks::Base.new(view, options).render_template(partial, &block)
end

.setup {|_self| ... } ⇒ Object

Default way to setup BuildingBlocks

Yields:

  • (_self)

Yield Parameters:



23
24
25
# File 'lib/building_blocks.rb', line 23

def self.setup
  yield self
end