CsvParser   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 3 1
A initialize() 0 5 1
1
require 'csv'
2
3
module Koine
4
  module Csv
5
    class CsvParser
6
      def initialize(options = {})
7
        defaults = { col_sep: ';' }
8
        options = defaults.merge(options)
9
        @parser_options = options
10
      end
11
12
      def parse(contents, &block)
13
        CSV.parse(contents, parser_options, &block)
14
      end
15
16
      protected
17
18
      attr_reader :parser_options
19
    end
20
  end
21
end
22