lib/mastalk/extensions.rb in mastalk-0.8.1 vs lib/mastalk/extensions.rb in mastalk-0.9.0
- old
+ new
@@ -24,12 +24,13 @@
Dir.foreach(SNIPPETS_FOLDER) do |file|
next if file == '.' || file == '..'
content = File.read(File.join(SNIPPETS_FOLDER, file))
start, stop = args(content)
+ erb = ERB.new(remove_syntax_from(content))
extension(start, stop) do |body|
body_lines = body.strip.gsub(/(\n|\r)+/, "\n").split(/\n/)
- ERB.new(remove_syntax_from(content)).result(binding)
+ erb.result(binding)
end
end
@@extensions
end