Class: CsvCop::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/csvcop/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(config = nil) ⇒ Config

Returns a new instance of Config.



4
5
6
7
# File 'lib/csvcop/config.rb', line 4

def initialize(config=nil)
  conf = CsvCop::ConfigLoader.new(config).load
  @config = conf.deep_symbolize_keys
end

Instance Method Details

#header?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/csvcop/config.rb', line 13

def header?
  @config[:AllCops][:Header]
end

#readObject



9
10
11
# File 'lib/csvcop/config.rb', line 9

def read
  @config
end