Sha256: dc0e82d2705d0cac4194b6509f9278e7cfd8bb47f3c944f687953be630d8f5b3

Contents?: true

Size: 716 Bytes

Versions: 2

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

module Rubysmith
  module Builders
    # Builds project skeleton core structure and minimum file support.
    class Core
      def self.call(configuration, builder: Builder) = new(configuration, builder: builder).call

      def initialize configuration, builder: Builder
        @configuration = configuration
        @builder = builder
      end

      def call
        builder.call(configuration.with(template_path: "%project_name%/lib/%project_name%.rb.erb"))
               .render
        builder.call(configuration.with(template_path: "%project_name%/.ruby-version.erb")).render
        nil
      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/core.rb
rubysmith-0.10.0 lib/rubysmith/builders/core.rb