lib/rubysmith/configuration/content.rb in rubysmith-4.1.0 vs lib/rubysmith/configuration/content.rb in rubysmith-4.2.0

- old
+ new

@@ -80,28 +80,24 @@ :project_url_source, :project_url_versions, :project_version, :target_root, :template_path, - :template_roots, - keyword_init: true + :template_roots ) do using Refinements::Arrays using Refinements::Strings using Refinements::Structs - def initialize *arguments + def initialize target_root: Pathname.pwd, template_roots: [], **arguments super - - self[:template_roots] ||= [Pathname(__dir__).join("../templates")] - self[:target_root] ||= Pathname.pwd freeze end - def add_template_roots paths - Array(paths).map { |path| Pathname path } - .including(template_roots) - .then { |roots| dup.merge! template_roots: roots } + def add_template_roots *paths + paths.map { |path| Pathname path } + .including(template_roots) + .then { |roots| dup.merge! template_roots: roots } end def maximize = update_build_options(true) def minimize = update_build_options(false)