lib/sqed/extractor.rb in sqed-0.5.8 vs lib/sqed/extractor.rb in sqed-0.6.0
- old
+ new
@@ -21,11 +21,11 @@
def initialize(**opts)
@metadata_map = opts[:metadata_map]
@boundaries = opts[:boundaries]
@image = opts[:image]
- raise Error, 'boundaries not provided or provided boundary is not a Sqed::Boundaries' if boundaries.nil? || !boundaries.class == Sqed::Boundaries
- raise Error, 'metadata_map not provided or metadata_map not a Hash' if metadata_map.nil? || !metadata_map.class == Hash
+ raise Error, 'boundaries not provided or provided boundary is not a Sqed::Boundaries' if boundaries.nil? || !boundaries.class.name == 'Sqed::Boundaries'
+ raise Error, 'metadata_map not provided or metadata_map not a Hash' if metadata_map.nil? || !metadata_map.class.name == 'Hash'
raise Error, 'image not provided' if image.nil? || !image.class.name == 'Magick::Image'
end
def result
r = Sqed::Result.new