Method: TableSetter::Table#load
- Defined in:
- lib/table_setter/table.rb
#load ⇒ Object
The load method handles the actual request either to the file system or remote url. It performs the requested data manipulations form the yml file after the data has been loaded. We’re keeping this explicit to control against unnecessary http requests.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/table_setter/table.rb', line 27 def load if @table_opts[:column_options] @table_opts[:column_options]['style'] ||= {} end @data = TableFu.new(csv_data, @table_opts[:column_options] || {}) if @table_opts[:faceting] @data.col_opts[:ignored] = [@table_opts[:faceting][:facet_by]] @facets = @data.faceted_by @table_opts[:faceting][:facet_by] end @data.delete_rows! @table_opts[:dead_rows] if @table_opts[:dead_rows] end |