Class: CsvCop::Config
- Inherits:
-
Object
- Object
- CsvCop::Config
- Defined in:
- lib/csvcop/config.rb
Instance Method Summary collapse
- #header? ⇒ Boolean
-
#initialize(config = nil) ⇒ Config
constructor
A new instance of Config.
- #read ⇒ Object
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
13 14 15 |
# File 'lib/csvcop/config.rb', line 13 def header? @config[:AllCops][:Header] end |
#read ⇒ Object
9 10 11 |
# File 'lib/csvcop/config.rb', line 9 def read @config end |