From 11fe339cc3bfa8836cb7c394f63afbaf933a9a41 Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Wed, 24 Apr 2024 15:42:25 +0200 Subject: Add renderContent in Page class --- page.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/page.rb b/page.rb index 6445c25..2f40c44 100644 --- a/page.rb +++ b/page.rb @@ -64,6 +64,8 @@ class Page end end + private + def parseConfig(configFile) if (File.exist?(configFile)) config = YAML.load_file(configFile) @@ -84,6 +86,12 @@ class Page end end + def renderContent + return @content&.strip || @content + end + + protected + attr_writer :fileName attr_writer :title attr_writer :pageNames -- cgit v1.2.3