18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/libis/tools/extend/roo.rb', line 18
def each(options = {})
return to_enum(:each, options) unless block_given?
@partial_match = options.delete(:partial_match) if options.has_key?(:partial_match)
= options.delete(:required_headers) if options.has_key?(:required_headers)
if options.empty?
first_row.upto(last_row) do |line|
yield row(line)
end
else
clean_sheet_if_need(options)
@headers = (options)
if
raise Roo::HeaderRowIncompleteError unless .keys & ==
end
.upto(last_row) do |line|
yield(Hash[.map { |k, v| [k, cell(line, v)] }])
end
end
end
|