Module: HtmlTable
- Defined in:
- lib/html_table.rb,
lib/html_table/version.rb
Defined Under Namespace
Classes: TableBuilder, TableRowBuilder
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
-
#table_builder ⇒ Object
readonly
Returns the value of attribute table_builder.
Instance Method Summary collapse
- #set_table_builder(collection, options, &block) ⇒ Object
- #table(collection = @collection, *args, &block) ⇒ Object
Instance Attribute Details
#table_builder ⇒ Object (readonly)
Returns the value of attribute table_builder.
5 6 7 |
# File 'lib/html_table.rb', line 5 def table_builder @table_builder end |
Instance Method Details
#set_table_builder(collection, options, &block) ⇒ Object
14 15 16 |
# File 'lib/html_table.rb', line 14 def set_table_builder(collection, , &block) @table_builder = TableBuilder.new(collection, , &block) end |
#table(collection = @collection, *args, &block) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/html_table.rb', line 6 def table(collection=@collection, *args, &block) if collection && collection.any? = args. set_table_builder(collection, , &block) @table_builder.to_s end end |