m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-12-15 14:41:07 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-12-15 14:41:07 +0100
commit046e3c9906999cd43e074472461c0800f787b234 (patch)
tree56c21b5793ae01d74ba30c90a36ee0a072ec7ca3 /lib
parent05868777b47a60cba919fa6bd5e90737979de6f7 (diff)
Add RSS feed
Diffstat (limited to 'lib')
-rw-r--r--lib/templated.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/templated.rb b/lib/templated.rb
index a7e0d63..9323903 100644
--- a/lib/templated.rb
+++ b/lib/templated.rb
@@ -7,6 +7,12 @@ def write_templated_file content_filename, options
write_templated content, content_filename, options
end
+def write_erb erb_filename
+ content = ERB.new(File.read(src erb_filename)).result
+ cut_filename = erb_filename.sub /\.erb$/, ''
+ File.write build(cut_filename), content
+end
+
def write_templated_erb erb_filename, options
content = ERB.new(File.read(src erb_filename)).result
cut_filename = erb_filename.sub /\.erb$/, ''