93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# File 'lib/deplate/define.rb', line 93
def use_template(template=@template, oargs={})
deplate = oargs[:deplate] || @deplate
args = oargs[:args] || @args
source = oargs[:source] || @source
if args['noTemplate'] or deplate.variables['legacyDefine1']
template
else
tmpl = Deplate::Template.new(:master => deplate,
:template => template,
:source => source,
:container => self)
rv = nil
Deplate::Define.let_variables(deplate, args) do
rv = tmpl.fill_in(deplate, :source => source)
end
rv
end
end
|