lib/masticate/sniffer.rb in masticate-0.1.3 vs lib/masticate/sniffer.rb in masticate-0.1.4
- old
+ new
@@ -8,13 +8,13 @@
def initialize(filename)
@filename = filename
end
- def sniff
+ def sniff(opts)
@col_sep = find_col_sep
@quote_char = delimstats[@col_sep][:quote_char]
- @stats = stats
+ @stats = stats if opts[:stats]
{
:col_sep => @col_sep,
:quote_char => @quote_char,
:field_counts => @stats,
:headers => @line1.split(@col_sep).map(&:strip)