From fb414cecd6002fbe5516def8c85a22a2c612bf7e Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sat, 31 Dec 2016 14:54:53 +0200 Subject: [PATCH] use helper --- lib/typed/parfait/class.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/typed/parfait/class.rb b/lib/typed/parfait/class.rb index 819ca4e2..a8fb0596 100644 --- a/lib/typed/parfait/class.rb +++ b/lib/typed/parfait/class.rb @@ -26,7 +26,7 @@ module Parfait super() @name = name @super_class_name = superclass - @instance_type = instance_type + set_instance_type( instance_type ) end def sof_reference_name @@ -38,8 +38,9 @@ module Parfait end # setting the type generates all methods for this type - # (or will do, once we storet the methods code to do that) + # (or will do, once we store the methods code to do that) def set_instance_type( type ) + raise "type must be type #{type}" unless type.is_a?(Type) @instance_type = type end