Class: Kiss::Form::Column
Instance Method Summary collapse
-
#components_html ⇒ Object
(also: #fields_html)
Renders HTML for form fields.
- #html ⇒ Object
-
#initialize(form = nil) ⇒ Column
constructor
A new instance of Column.
-
#table_html_close ⇒ Object
Renders close of form table.
-
#table_html_open ⇒ Object
Renders open of form table.
Constructor Details
#initialize(form = nil) ⇒ Column
Returns a new instance of Column.
41 42 43 44 |
# File 'lib/kiss/form.rb', line 41 def initialize(form = nil) @_form = form @_components = [] end |
Instance Method Details
#components_html ⇒ Object Also known as: fields_html
Renders HTML for form fields.
47 48 49 50 51 |
# File 'lib/kiss/form.rb', line 47 def components_html @_components.map do |component| form.component_html(component) end.join end |
#html ⇒ Object
64 65 66 67 68 69 70 71 72 |
# File 'lib/kiss/form.rb', line 64 def html [ '<td class="kiss_form_column">', table_html_open, components_html, table_html_close, '</td>' ].join end |
#table_html_close ⇒ Object
Renders close of form table.
60 61 62 |
# File 'lib/kiss/form.rb', line 60 def table_html_close '</tbody></table>' end |
#table_html_open ⇒ Object
Renders open of form table.
55 56 57 |
# File 'lib/kiss/form.rb', line 55 def table_html_open %Q(<table class="kiss_form_column" border=0 cellspacing=0><tbody>) end |