Sha256: 5fe6eeddc4bb04eb6c5d3fe3995e39b01dc4e8f3915cd3e12d1d4956a0d6c11b

Contents?: true

Size: 636 Bytes

Versions: 2

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

module Rubysmith
  module Builders
    # Builds project skeleton RubyCritic code quality support.
    class RubyCritic
      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_ruby_critic

        builder.call(configuration.with(template_path: "%project_name%/.rubycritic.yml.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/ruby_critic.rb
rubysmith-0.10.0 lib/rubysmith/builders/ruby_critic.rb