small cleanup
This commit is contained in:
parent
9fafbe4e96
commit
299a130761
@ -22,19 +22,10 @@ module Parfait
|
|||||||
raise "source must be vool" unless source.is_a?(Vool::Statement)
|
raise "source must be vool" unless source.is_a?(Vool::Statement)
|
||||||
end
|
end
|
||||||
|
|
||||||
def normalize_source
|
|
||||||
@source = yield @source
|
|
||||||
end
|
|
||||||
|
|
||||||
def create_parfait_method( type )
|
def create_parfait_method( type )
|
||||||
raise "create_method #{type.inspect} is not a Type" unless type.is_a? Parfait::Type
|
raise "create_method #{type.inspect} is not a Type" unless type.is_a? Parfait::Type
|
||||||
type.create_method( @name , @args_type , @frame_type)
|
type.create_method( @name , @args_type , @frame_type)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_tmp
|
|
||||||
tmp_name = "tmp_#{@frame_type.instance_length}".to_sym
|
|
||||||
@frame_type = @frame_type.add_instance_variable( tmp_name , :Object )
|
|
||||||
tmp_name
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# A simple event registering/triggering module to mix into classes.
|
|
||||||
# Events are stored in the `@events` ivar.
|
|
||||||
module Util
|
module Util
|
||||||
|
# A simple event registering/triggering module to mix into classes.
|
||||||
|
# Events are stored in the `@events` ivar.
|
||||||
module Eventable
|
module Eventable
|
||||||
|
|
||||||
# Risc a handler for the given event name.
|
# Risc a handler for the given event name.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user