aboutsummaryrefslogtreecommitdiff
path: root/page.rb
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-04-24 15:41:53 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-04-25 11:33:30 +0200
commitd353991bd927da30c4e883deb19d065ba9db4041 (patch)
tree1302c4c99039732f2e1784feb3f769df5f174b54 /page.rb
parent78449da6c440af1fe0cb8f7a557122f73efbaae9 (diff)
downloadhyde-d353991bd927da30c4e883deb19d065ba9db4041.tar.gz
hyde-d353991bd927da30c4e883deb19d065ba9db4041.zip
Add includeFile method in Page class
Diffstat (limited to 'page.rb')
-rw-r--r--page.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/page.rb b/page.rb
index 518e09a..6445c25 100644
--- a/page.rb
+++ b/page.rb
@@ -39,6 +39,11 @@ class Page
parseConfig(fileName + '.config')
end
+ def includeFile(fileName)
+ t = ERB.new(File.read(File.expand_path(fileName)))
+ return t.result(binding)
+ end
+
def render
if (@master != nil)
t = ERB.new(File.read(File.expand_path(@fileName)))