Class: Rubysmith::Builders::Documentation::Readme
- Inherits:
-
Object
- Object
- Rubysmith::Builders::Documentation::Readme
- Defined in:
- lib/rubysmith/builders/documentation/readme.rb
Overview
Builds project skeleton README documentation.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, builder: Builder) ⇒ Readme
constructor
A new instance of Readme.
Constructor Details
Class Method Details
.call ⇒ Object
13 |
# File 'lib/rubysmith/builders/documentation/readme.rb', line 13 def self.call(...) = new(...).call |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rubysmith/builders/documentation/readme.rb', line 20 def call return configuration unless configuration.build_readme builder.call(configuration.merge(template_path: "%project_name%/README.#{kind}.erb")) .render .replace(/\n{2,}/, "\n\n") .replace("\n \n", "\n") configuration end |