Class: Csv2hash::Configuration
- Inherits:
-
Object
- Object
- Csv2hash::Configuration
- Defined in:
- lib/csv2hash/configuration.rb
Instance Attribute Summary collapse
-
#convert ⇒ Object
attr_accessor :extra_values.
-
#exact_matching ⇒ Object
Returns the value of attribute exact_matching.
-
#false_values ⇒ Object
Returns the value of attribute false_values.
-
#ignore_case ⇒ Object
Returns the value of attribute ignore_case.
-
#nil_values ⇒ Object
Returns the value of attribute nil_values.
-
#true_values ⇒ Object
Returns the value of attribute true_values.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 19 |
# File 'lib/csv2hash/configuration.rb', line 11 def initialize self.convert = false self.true_values = ['yes','y','t'] self.false_values = ['no','n','f'] self.nil_values = ['nil','null'] # self.extra_values = {} # { [] => } self.ignore_case = false self.exact_matching = false end |
Instance Attribute Details
#convert ⇒ Object
attr_accessor :extra_values
7 8 9 |
# File 'lib/csv2hash/configuration.rb', line 7 def convert @convert end |
#exact_matching ⇒ Object
Returns the value of attribute exact_matching.
9 10 11 |
# File 'lib/csv2hash/configuration.rb', line 9 def exact_matching @exact_matching end |
#false_values ⇒ Object
Returns the value of attribute false_values.
4 5 6 |
# File 'lib/csv2hash/configuration.rb', line 4 def false_values @false_values end |
#ignore_case ⇒ Object
Returns the value of attribute ignore_case.
8 9 10 |
# File 'lib/csv2hash/configuration.rb', line 8 def ignore_case @ignore_case end |
#nil_values ⇒ Object
Returns the value of attribute nil_values.
5 6 7 |
# File 'lib/csv2hash/configuration.rb', line 5 def nil_values @nil_values end |
#true_values ⇒ Object
Returns the value of attribute true_values.
3 4 5 |
# File 'lib/csv2hash/configuration.rb', line 3 def true_values @true_values end |