Class: TableHelper::HtmlElement
- Inherits:
-
Object
- Object
- TableHelper::HtmlElement
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- lib/table_helper/html_element.rb
Overview
Represents an HTML element
Modifying HTML options
HTML options can normally be specified when creating the element. However, if they need to be modified after the element has been created, you can access the properties like so:
r = Row.new
r[:style] = 'display: none;'
or for a cell:
c = Cell.new
c[:style] = 'display: none;'
Instance Method Summary collapse
-
#html ⇒ Object
Generates the html representing this element.
-
#initialize(html_options = {}) ⇒ HtmlElement
constructor
:nodoc:.
Constructor Details
#initialize(html_options = {}) ⇒ HtmlElement
:nodoc:
22 23 24 |
# File 'lib/table_helper/html_element.rb', line 22 def initialize( = {}) #:nodoc: @html_options = .symbolize_keys end |
Instance Method Details
#html ⇒ Object
Generates the html representing this element
27 28 29 |
# File 'lib/table_helper/html_element.rb', line 27 def html content_tag(tag_name, content, @html_options) end |