Class: Rubysmith::Builders::Guard
- Inherits:
-
Object
- Object
- Rubysmith::Builders::Guard
- Defined in:
- lib/rubysmith/builders/guard.rb
Overview
Builds project skeleton Guard support for a red, green, refactor loop.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, builder: Builder) ⇒ Guard
constructor
A new instance of Guard.
Constructor Details
Class Method Details
.call ⇒ Object
11 |
# File 'lib/rubysmith/builders/guard.rb', line 11 def self.call(...) = new(...).call |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rubysmith/builders/guard.rb', line 18 def call return configuration unless configuration.build_guard builder.call(configuration.merge(template_path: "%project_name%/bin/guard.erb")) .render .permit 0o755 builder.call(configuration.merge(template_path: "%project_name%/Guardfile.erb")).render configuration end |