Sha256: b26229790718d1e52f0acbfb9f1c3a5a51d2c49697b488d1d46da1bb1cdd8b64

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

# frozen_string_literal: true

module Rubysmith
  module Builders
    # Builds project skeleton setup script.
    class Setup
      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_setup

        builder.call(configuration.with(template_path: "%project_name%/bin/setup.erb"))
               .render
               .permit 0o755
      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/setup.rb
rubysmith-0.10.0 lib/rubysmith/builders/setup.rb