Class: Shoehorn::Components::Modal
- Defined in:
- lib/shoehorn/components/modal.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(body_elements, footer_elements, options = {}) ⇒ Modal
constructor
A new instance of Modal.
- #to_s ⇒ Object
Constructor Details
#initialize(body_elements, footer_elements, options = {}) ⇒ Modal
Returns a new instance of Modal.
5 6 7 8 9 |
# File 'lib/shoehorn/components/modal.rb', line 5 def initialize(body_elements, , = {}) super @body_elements = body_elements @footer_elements = end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
3 4 5 |
# File 'lib/shoehorn/components/modal.rb', line 3 def collection @collection end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/shoehorn/components/modal.rb', line 11 def to_s output_buffer << content_tag(:div, :id => [:id], :class => modal_classes) do html='' html << build_header html << build_body html << html.html_safe end super end |