aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guff/template.cr10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/guff/template.cr b/src/guff/template.cr
index 3068669..c784a90 100644
--- a/src/guff/template.cr
+++ b/src/guff/template.cr
@@ -130,11 +130,15 @@ class Guff::Template
@ops = parse(@string) as Array(Ops::Op)
end
+ def run(io : IO, args : Hash(String, String))
+ @ops.each do |op|
+ io << op.run(args)
+ end
+ end
+
def run(args : Hash(String, String))
String.build do |io|
- @ops.each do |op|
- io << op.run(args)
- end
+ run(io, args)
end
end