Class: Bootstrap::Component::Layout
- Inherits:
-
OldComponent
- Object
- Bootstrap::Component
- OldComponent
- Bootstrap::Component::Layout
- Defined in:
- mod/bootstrap/lib/bootstrap/component/layout.rb
Overview
generate bootstrap column layout
Instance Method Summary collapse
Methods inherited from OldComponent
add_div_method, add_tag_method, #append, #initialize, #insert, #prepend, render, #wrap
Methods included from Delegate
#method_missing, #respond_to_missing?
Methods inherited from Bootstrap::Component
#append, def_div_method, def_simple_tag_method, def_tag_method, #initialize, #insert, #prepend, render, #wrap
Methods included from BasicTags
Constructor Details
This class inherits a constructor from Bootstrap::OldComponent
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bootstrap::Delegate
Instance Method Details
#render ⇒ Object
21 22 23 24 25 26 |
# File 'mod/bootstrap/lib/bootstrap/component/layout.rb', line 21 def render @rendered = begin render_content @content[-1] end end |
#render_content ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'mod/bootstrap/lib/bootstrap/component/layout.rb', line 28 def render_content content = instance_exec *@args, &@build_block add_content content opts = @args.first return unless opts && opts.delete(:container) content = @content.pop @content = ["".html_safe] container content, opts end |