Method: FatTable::Table.from_csv_string
- Defined in:
- lib/fat_table/table.rb
.from_csv_string(str, has_headers: true) ⇒ Object
Construct a Table from a CSV string +str+, treated in the same manner as the input from a CSV file in ::from_org_file.
167 168 169 170 171 |
# File 'lib/fat_table/table.rb', line 167 def self.from_csv_string(str, has_headers: true, **) from_csv_io(StringIO.new(str), has_headers:, **) rescue NoTable raise NoTable, "no table found in string '#{str[0..20]}...'" end |