lib/yoti/doc_scan/session/create/requested_check.rb in yoti-1.9.0 vs lib/yoti/doc_scan/session/create/requested_check.rb in yoti-1.10.0
- old
+ new
@@ -11,10 +11,10 @@
#
# @param [String] type The type of the Check to create
# @param [#as_json] config The configuration to apply to the Check
#
def initialize(type, config)
- raise(TypeError, "#{self.class} cannot be instantiated") if self.class == RequestedCheck
+ raise(TypeError, "#{self.class} cannot be instantiated") if instance_of?(RequestedCheck)
Validation.assert_is_a(String, type, 'type')
@type = type
Validation.assert_respond_to(:as_json, config, 'config')