lib/csv2hash/definition.rb in csv2hash-0.6.2 vs lib/csv2hash/definition.rb in csv2hash-0.6.3
- old
+ new
@@ -4,14 +4,14 @@
MAPPING = 'mapping'.freeze
COLLECTION = 'collection'.freeze
TYPES = [ MAPPING, COLLECTION ]
- attr_accessor :cells, :structure_rules, :header_size
- attr_reader :type, :name
+ attr_accessor :cells, :structure_rules, :header_size, :name
+ attr_reader :type
def initialize name, &blk
- @name = name
+ self.name = name
self.cells = []
self.header_size = 0
self.structure_rules = {}
instance_eval(&blk) if block_given?
end