using new macro approach for builtin, testing first
This commit is contained in:
13
lib/vool/builtin.rb
Normal file
13
lib/vool/builtin.rb
Normal file
@ -0,0 +1,13 @@
|
||||
module Vool
|
||||
module Builtin
|
||||
def self.boot_methods(options)
|
||||
return if options[:boot_methods] == false
|
||||
load_builtin( :int_plus )
|
||||
end
|
||||
|
||||
def self.load_builtin(name)
|
||||
fname = "./builtin/#{name}.rb"
|
||||
File.read File.expand_path(fname, File.dirname(__FILE__))
|
||||
end
|
||||
end
|
||||
end
|
5
lib/vool/builtin/int_plus.rb
Normal file
5
lib/vool/builtin/int_plus.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class Integer < DataObject4
|
||||
def +(other)
|
||||
return X.int_operator( :+ )
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user