Class: Interview::Alert
- Defined in:
- lib/interview/controls/alert.rb
Instance Attribute Summary
Attributes inherited from Text
Attributes included from HasHtmlOptions
Attributes inherited from Control
Instance Method Summary collapse
Methods included from HasHtmlOptions
Methods inherited from Control
#ancestors, #build_child, #build_with_params, #find_attribute, #find_attribute!, #initialize, #set_attributes, #set_defaults
Instance Method Details
#build(b) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/interview/controls/alert.rb', line 4 def build(b) html_class = @html_class.dup html_class << 'alert' html_class << "alert-#{@style}" if @style b.section html_class: html_class, html_options: @html_options do build_text(b) yield if block_given? end end |