Sha256: 67ac7efaa9feb1a82e992a5f8384f3c6f4de0c64f2b044f170dc892a529c98e9

Contents?: true

Size: 711 Bytes

Versions: 18

Compression:

Stored size: 711 Bytes

Contents

# frozen_string_literal: true

require "refinements/structs"

module Rubysmith
  module Builders
    module Git
      # Initializes project skeleton with Git Safe support.
      class Safe
        using Refinements::Structs

        def self.call(...) = new(...).call

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

        def call
          return configuration unless configuration.build_git

          builder.call(configuration.merge(template_path: "%project_name%/.git/safe")).make_path
          configuration
        end

        private

        attr_reader :configuration, :builder
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rubysmith-5.9.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.8.1 lib/rubysmith/builders/git/safe.rb
rubysmith-5.8.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.7.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.6.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.5.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.4.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.3.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.2.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.1.0 lib/rubysmith/builders/git/safe.rb
rubysmith-5.0.1 lib/rubysmith/builders/git/safe.rb
rubysmith-4.9.0 lib/rubysmith/builders/git/safe.rb
rubysmith-4.8.0 lib/rubysmith/builders/git/safe.rb
rubysmith-4.7.0 lib/rubysmith/builders/git/safe.rb
rubysmith-4.6.1 lib/rubysmith/builders/git/safe.rb
rubysmith-4.6.0 lib/rubysmith/builders/git/safe.rb
rubysmith-4.5.0 lib/rubysmith/builders/git/safe.rb
rubysmith-4.4.0 lib/rubysmith/builders/git/safe.rb