lib/yoti/doc_scan/session/create/required_document.rb in yoti-1.9.0 vs lib/yoti/doc_scan/session/create/required_document.rb in yoti-1.10.0
- old
+ new
@@ -7,10 +7,10 @@
class RequiredDocument
#
# @param [String] type
#
def initialize(type)
- raise(TypeError, "#{self.class} cannot be instantiated") if self.class == RequiredDocument
+ raise(TypeError, "#{self.class} cannot be instantiated") if instance_of?(RequiredDocument)
Validation.assert_is_a(String, type, 'type')
@type = type
end