Sha256: 23a65f2dd4a0db33d59da257589d0a172498b29b98bb3d49631e012e8a4d704e

Contents?: true

Size: 597 Bytes

Versions: 6

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

module Rubysmith
  module Builders
    module Git
      # Initializes project skeleton as a Git repository.
      class Setup
        def self.call(...) = new(...).call

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

        def call
          return unless configuration.build_git

          builder.call(configuration).run("git init", chdir: configuration.project_name)
        end

        private

        attr_reader :configuration, :builder
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubysmith-0.16.1 lib/rubysmith/builders/git/setup.rb
rubysmith-0.16.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.15.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.14.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.13.0 lib/rubysmith/builders/git/setup.rb
rubysmith-0.12.0 lib/rubysmith/builders/git/setup.rb