lib/sqed/extractor.rb in sqed-0.1.1 vs lib/sqed/extractor.rb in sqed-0.1.2
- old
+ new
@@ -25,13 +25,16 @@
end
def result
r = Sqed::Result.new()
+ r.sections = metadata_map.values.sort
+
# assign the images to the result
boundaries.each do |section_index, coords|
- image_setter = "#{metadata_map[section_index]}_image="
- r.send(image_setter, extract_image(coords))
+ section_type = metadata_map[section_index]
+ r.send("#{section_type}_image=", extract_image(coords))
+ r.boundary_coordinates[section_type] = coords
end
# assign the metadata to the result
metadata_map.each do |section_index, section_type|
# only extract data if a parser exists