rename singleton_class to single_class and misc

was clashing with real ruby method name
also many superclass mismatch fixes
some misc
This commit is contained in:
2019-09-24 17:25:19 +03:00
parent dd810cfc49
commit 3df54910cc
29 changed files with 87 additions and 35 deletions

View File

@ -12,11 +12,11 @@ module Vool
# Must pass in the actual Parfait class (default nil is just to conform to api)
def to_parfait( clazz = nil )
raise "No class given to class method #{name}" unless clazz
clazz.add_instance_method_for(name , make_arg_type , make_frame , body )
clazz.single_class.add_instance_method_for(name , make_arg_type , make_frame , body )
end
def to_mom(clazz)
raise "not singleton" unless clazz.class == Parfait::SingletonClass
raise "not singleton #{clazz.class}" unless clazz.class == Parfait::SingletonClass
raise( "no class in #{self}") unless clazz
method = clazz.get_instance_method(name )
raise( "no class method in #{@name} in #{clazz}") unless method