Class: Rubysmith::Builders::Rake
- Inherits:
-
Object
- Object
- Rubysmith::Builders::Rake
- Defined in:
- lib/rubysmith/builders/rake.rb
Overview
Builds project skeleton Rake support.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, builder: Builder) ⇒ Rake
constructor
A new instance of Rake.
Constructor Details
Class Method Details
.call(configuration, builder: Builder) ⇒ Object
7 |
# File 'lib/rubysmith/builders/rake.rb', line 7 def self.call(configuration, builder: Builder) = new(configuration, builder: builder).call |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rubysmith/builders/rake.rb', line 14 def call builder.call(configuration.with(template_path: "%project_name%/Rakefile.erb")) .render .replace(/\[\s+/, "[") .replace(/\s+\]/, "]") .replace(" ", "") .replace(/\n+(?=require)/, "\n") .replace(/\n{2,}/, "\n\n") nil end |