lib/rubysmith/builders/documentation/license.rb in rubysmith-6.6.0 vs lib/rubysmith/builders/documentation/license.rb in rubysmith-6.9.0
- old
+ new
@@ -5,20 +5,13 @@
module Rubysmith
module Builders
module Documentation
# Builds project skeleton LICENSE documentation.
- class License
+ class License < Abstract
using Refinements::Struct
- def self.call(...) = new(...).call
-
- def initialize configuration, builder: Builder
- @configuration = configuration
- @builder = builder
- end
-
def call
return configuration unless configuration.build_license
configuration.merge(template_path: "%project_name%/LICENSE-#{license}.#{kind}.erb")
.then do |updated_configuration|
@@ -27,11 +20,9 @@
configuration
end
private
-
- attr_reader :configuration, :builder
def kind = configuration.documentation_format
def license = configuration.license_name
end