lib/rubysmith/builders/documentation/license.rb in rubysmith-6.10.0 vs lib/rubysmith/builders/documentation/license.rb in rubysmith-7.0.0
- old
+ new
@@ -1,32 +1,31 @@
# frozen_string_literal: true
require "refinements/struct"
-require "tocer"
module Rubysmith
module Builders
module Documentation
# Builds project skeleton LICENSE documentation.
class License < Abstract
using Refinements::Struct
def call
- return configuration unless configuration.build_license
+ return false unless settings.build_license
- configuration.merge(template_path: "%project_name%/LICENSE-#{license}.#{kind}.erb")
- .then do |updated_configuration|
- builder.call(updated_configuration).render.rename "LICENSE.#{kind}"
- end
+ settings.merge(template_path: "%project_name%/LICENSE-#{license}.#{kind}.erb")
+ .then do |updated_settings|
+ builder.call(updated_settings).render.rename "LICENSE.#{kind}"
+ end
- configuration
+ true
end
private
- def kind = configuration.documentation_format
+ def kind = settings.documentation_format
- def license = configuration.license_name
+ def license = settings.license_name
end
end
end
end