call original method_missing() from Environment's method_missing() when a builder is not found
This commit is contained in:
parent
16918570d2
commit
58d7f4edd5
@ -61,11 +61,15 @@ module Rscons
|
|||||||
fname.sub(/\.[^.]*$/, '')
|
fname.sub(/\.[^.]*$/, '')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
alias_method :orig_method_missing, :method_missing
|
||||||
|
|
||||||
def method_missing(method, *args)
|
def method_missing(method, *args)
|
||||||
if @builders.has_key?(method.to_s)
|
if @builders.has_key?(method.to_s)
|
||||||
# TODO: build sources if necessary
|
# TODO: build sources if necessary
|
||||||
builder = @builders[method.to_s].new
|
builder = @builders[method.to_s].new
|
||||||
builder.run(self, *args)
|
builder.run(self, *args)
|
||||||
|
else
|
||||||
|
orig_method_missing(method, *args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user