refactor also building word

obviously created by copy/paste, more refactoring possible
This commit is contained in:
Torsten Ruger
2016-12-15 19:31:39 +02:00
parent 5ea6bfed27
commit dc56274940
4 changed files with 16 additions and 25 deletions

View File

@ -12,8 +12,9 @@ module Register
return me , index
end
def compiler_for( method_name , args)
Typed::Compiler.new.create_method(:Object , method_name , args ).init_method
def compiler_for( type , method_name , extra_args = {})
args = {:index => :Integer}.merge( extra_args )
Typed::Compiler.new.create_method(type , method_name , args ).init_method
end
# Load the value