Class: MergeExcel::Header
- Inherits:
-
Object
- Object
- MergeExcel::Header
- Defined in:
- lib/merge_excel/header.rb
Instance Method Summary collapse
-
#initialize(array, extra_data_hash) ⇒ Header
constructor
A new instance of Header.
- #to_a ⇒ Object
Constructor Details
#initialize(array, extra_data_hash) ⇒ Header
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/merge_excel/header.rb', line 3 def initialize(array, extra_data_hash) if extra_data_hash extra_array = extra_data_hash.data.map{|e| e.label} case extra_data_hash.position when :beginning @array = extra_array + array else @array = array + extra_array end else @array = array end end |
Instance Method Details
#to_a ⇒ Object
18 19 20 |
# File 'lib/merge_excel/header.rb', line 18 def to_a @array.to_a end |