diff options
Diffstat (limited to 'new/bin')
-rw-r--r-- | new/bin/builder.rb | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/new/bin/builder.rb b/new/bin/builder.rb index 7172cf85..b5f5270b 100644 --- a/new/bin/builder.rb +++ b/new/bin/builder.rb @@ -22,27 +22,23 @@ end.parse! module Crys class BuilderRunner - def initialize(file_path:, image_dir:, output_dir:, builder_class:, batch_builder_class:, theme_dir:, pages_db:) - @file_path = file_path - @output_dir = output_dir - @builder_class = builder_class - @batch_builder_class = batch_builder_class - @image_dir = image_dir - @theme_dir = theme_dir - @pages_db = pages_db + def initialize(batch_builder:, builder:, batch:) + @builder = builder + @batch_builder = batch_builder + @batch = batch end def run - if file_path == :all - batch_builder_class.new(pages_db: pages_db, output_dir: output_dir, image_dir: image_dir, - builder_class: builder_class).build + p batch + if batch + batch_builder.build else - builder_class.new(file_path: file_path, output_dir: output_dir, image_dir: image_dir).build + builder.build end end private - attr_reader :builder_class, :file_path, :output_dir, :image_dir, :batch_builder_class, :theme_dir, :pages_db + attr_reader :builder, :batch_builder, :batch end end |