Sha256: 60e04799e351f256b1efdf0fa9a1a9a39fde6a5a6bbd2c7b712170bcd6ea3205
Contents?: true
Size: 693 Bytes
Versions: 5
Compression:
Stored size: 693 Bytes
Contents
# frozen_string_literal: true require_relative 'generate_song_file' module Songbook class GenerateSongFiles attr_reader :input_path, :output_path, :verbose def initialize(input_path:, output_path:, verbose: false) @input_path = input_path @output_path = output_path @verbose = verbose end def call Dir.glob("#{input_path}/*.yml") do |filename| basename = File.basename(filename, '.yml') output_file = "#{output_path}/#{basename}.txt" service = GenerateSongFile.new( input_path: filename, output_path: output_file, verbose: verbose ) service.call end end end end
Version data entries
5 entries across 5 versions & 1 rubygems