From d5c291cdd34c6a10ebd33b10b274bb073113df2f Mon Sep 17 00:00:00 2001 From: Schneems Date: Wed, 20 Nov 2024 16:26:40 -0600 Subject: [PATCH] Refactor logic to method --- lib/rundoc/code_section.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rundoc/code_section.rb b/lib/rundoc/code_section.rb index 118fed3..2ccd6ad 100644 --- a/lib/rundoc/code_section.rb +++ b/lib/rundoc/code_section.rb @@ -73,6 +73,10 @@ def render return "" if hidden? + self.class.to_doc(result: result, env: env) + end + + def self.to_doc(result: , env: ) array = [env[:before]] result.flatten!