Sha256: 1c8af6e4e19873c8e9797e988f52f6d85919f90d91c7ec2a802f6ee350ad5d3f

Contents?: true

Size: 651 Bytes

Versions: 10

Compression:

Stored size: 651 Bytes

Contents

# frozen_string_literal: true

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

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

      def call
        builder.call(realm.with(template_path: "%project_name%/lib/%project_name%.rb.erb")).render
        builder.call(realm.with(template_path: "%project_name%/.ruby-version.erb")).render
        nil
      end

      private

      attr_reader :realm, :builder
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubysmith-0.9.1 lib/rubysmith/builders/core.rb
rubysmith-0.9.0 lib/rubysmith/builders/core.rb
rubysmith-0.8.0 lib/rubysmith/builders/core.rb
rubysmith-0.7.0 lib/rubysmith/builders/core.rb
rubysmith-0.6.1 lib/rubysmith/builders/core.rb
rubysmith-0.6.0 lib/rubysmith/builders/core.rb
rubysmith-0.5.0 lib/rubysmith/builders/core.rb
rubysmith-0.4.0 lib/rubysmith/builders/core.rb
rubysmith-0.3.0 lib/rubysmith/builders/core.rb
rubysmith-0.2.0 lib/rubysmith/builders/core.rb