From f3039744d72454e7e3b8cb1032266bcc172ce488 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 12 Sep 2021 14:17:19 +0200 Subject: Initial commit --- lib/html.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/html.rb (limited to 'lib/html.rb') diff --git a/lib/html.rb b/lib/html.rb new file mode 100644 index 0000000..61e25a3 --- /dev/null +++ b/lib/html.rb @@ -0,0 +1,13 @@ +require './lib/templated' + +def render_html song + template = html_template 'song' + template.result binding +end + +def make_htmls songs + songs.each do |song_id, song| + content = render_html song + write_templated content, song_html(song_id), song.title + end +end -- cgit v1.2.3