10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/libis/tools/extend/roo.rb', line 10
def each(options = {})
return to_enum(:each, options) unless block_given?
if options.empty?
1.upto(last_row) do |line|
yield row(line)
end
else
clean_sheet_if_need(options)
(options)
= ||
Hash[(first_column..last_column).map do |col|
[cell(, col), col]
end]
start_line = || 1
start_line = ( || 0) + 1 if @options[:skip_headers]
start_line.upto(last_row) do |line|
yield(Hash[.map { |k, v| [k, cell(line, v)] }])
end
end
end
|