diff options
author | 2024-04-24 15:41:53 +0200 | |
---|---|---|
committer | 2024-04-25 11:33:30 +0200 | |
commit | d353991bd927da30c4e883deb19d065ba9db4041 (patch) | |
tree | 1302c4c99039732f2e1784feb3f769df5f174b54 | |
parent | 78449da6c440af1fe0cb8f7a557122f73efbaae9 (diff) | |
download | hyde-d353991bd927da30c4e883deb19d065ba9db4041.tar.gz hyde-d353991bd927da30c4e883deb19d065ba9db4041.zip |
Add includeFile method in Page class
-rw-r--r-- | page.rb | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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))) |