metaclass is back

this time with a real purpose and implementation as the intermediary
As the interface to the layout and for replacing an edited layout
This commit is contained in:
Torsten Ruger
2015-11-07 00:11:56 +02:00
parent ebcc15d314
commit 204200b92a
5 changed files with 73 additions and 19 deletions

View File

@@ -80,7 +80,7 @@ module Parfait
has = super_index(name)
return nil unless has
raise "internal error #{name}:#{has}" if has < 1
(1 + has / 2).to_i # to_i for opal
(1 + has / 2).to_i # to_i for opal
end
def inspect
@@ -96,11 +96,5 @@ module Parfait
nil # stop resolve recursing up metaclasses
end
def create_instance_method method_name , arguments
raise "create_instance_method #{method_name}.#{method_name.class}" unless method_name.is_a?(Symbol)
#puts "Self: #{self.class} clazz: #{clazz.name}"
add_instance_method Method.new( self , method_name , arguments )
end
end
end