lib/erb_asterisk.rb in erb_asterisk-0.0.10 vs lib/erb_asterisk.rb in erb_asterisk-0.0.11
- old
+ new
@@ -6,15 +6,15 @@
# Render template
def render(template, vars = {})
tpl = read_template(template)
e = ERB.new(tpl)
- b = TOPLEVEL_BINDING
+ b = binding
vars.each do |name, value|
b.local_variable_set(name, value)
end
- e.result
+ e.result(b)
end
# Declare current config file inclusion to file_name
# args can has :priority key (larger the number - higher the priority)
def include_to(file_name, args = {})