require 'fileutils' require_relative 'lib/app_config' require_relative 'lib/data_file_generator' class DashboardGenerator def initialize(config) @config = AppConfig.new config end def generate output_dir = @config[:output_dir] FileUtils.mkdir_p output_dir data_file_generator = DataFileGenerator.new @config data_file_generator.generate source_dir = File.join File.dirname(__FILE__), 'lib', 'web' FileUtils.cp_r "#{source_dir}/.", output_dir end end