Sha256: 4e8c28fc95348a1fda3959db77a96c30b0d46527ce6a6d32ca269abca35fa772
Contents?: true
Size: 773 Bytes
Versions: 2
Compression:
Stored size: 773 Bytes
Contents
# frozen_string_literal: true module Rubysmith module Builders # Builds project skeleton Guard support for a red, green, refactor loop. class Guard def self.call(configuration, builder: Builder) = new(configuration, builder: builder).call def initialize configuration, builder: Builder @configuration = configuration @builder = builder end def call return unless configuration.build_guard builder.call(configuration.with(template_path: "%project_name%/bin/guard.erb")) .render .permit 0o755 builder.call(configuration.with(template_path: "%project_name%/Guardfile.erb")).render end private attr_reader :configuration, :builder end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubysmith-0.11.0 | lib/rubysmith/builders/guard.rb |
rubysmith-0.10.0 | lib/rubysmith/builders/guard.rb |