Class: ReciteCSV::Header::Definition::Array::ColumnMethodsBuilder
- Inherits:
-
Module
- Object
- Module
- ReciteCSV::Header::Definition::Array::ColumnMethodsBuilder
- Defined in:
- lib/recite_csv/header/definition.rb
Instance Method Summary collapse
-
#initialize(raw_definition) ⇒ ColumnMethodsBuilder
constructor
A new instance of ColumnMethodsBuilder.
Constructor Details
#initialize(raw_definition) ⇒ ColumnMethodsBuilder
Returns a new instance of ColumnMethodsBuilder.
52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/recite_csv/header/definition.rb', line 52 def initialize(raw_definition) super() raw_definition.each.with_index do |name, idx| next if name.nil? || name.empty? define_method name do self[idx] end end end |