Class: Rubysmith::Builders::Documentation::License

Inherits:
Abstract
  • Object
show all
Defined in:
lib/rubysmith/builders/documentation/license.rb

Overview

Builds project skeleton LICENSE documentation.

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

This class inherits a constructor from Rubysmith::Builders::Abstract

Instance Method Details

#callObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/rubysmith/builders/documentation/license.rb', line 12

def call
  return false unless settings.build_license

  settings.merge(template_path: "%project_name%/LICENSE-#{license}.#{kind}.erb")
          .then do |updated_settings|
            builder.call(updated_settings).render.rename "LICENSE.#{kind}"
          end

  true
end