lib/csv_decision/columns.rb in csv_decision-0.0.8 vs lib/csv_decision/columns.rb in csv_decision-0.0.9

- old
+ new

@@ -6,17 +6,10 @@ # See LICENSE and README.md for details. module CSVDecision # Dictionary of all this table's columns - inputs, outputs etc. # @api private class Columns - # Value object to hold column dictionary entries. - Entry = Struct.new(:name, :eval, :type) do - def ins? - %i[in guard].member?(type) ? true : false - end - end - # TODO: Value object used for any columns with defaults # Default = Struct.new(:name, :function, :default_if) # Dictionary of all data columns. # The key of each hash is the header cell's array column index. @@ -86,10 +79,10 @@ # If a column does not have a valid header cell, then it's empty of data. # Return the stripped header row, and remove it from the data array. row = Header.strip_empty_columns(rows: table.rows) # Build a dictionary of all valid data columns from the header row. - @dictionary = Header.dictionary(row: row) if row + @dictionary = CSVDecision::Dictionary.build(header: row, dictionary: Dictionary.new) if row freeze end end end \ No newline at end of file