Sha256: 48df603e77745546ef8d7769194698d9307e8d7b432b1e0bd00136aed8ad954f

Contents?: true

Size: 552 Bytes

Versions: 11

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

require "refinements/struct"

module Gemsmith
  module Builders
    # Builds project skeleton console for object inspection and exploration.
    class Console < Rubysmith::Builders::Console
      using Refinements::Struct

      def call
        return false unless settings.build_console

        super
        builder.call(settings.merge(template_path: "%project_name%/bin/console.erb"))
               .replace(/require Bundler.root.+/, %(require "#{settings.project_path}"))

        true
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gemsmith-22.10.0 lib/gemsmith/builders/console.rb
gemsmith-22.9.0 lib/gemsmith/builders/console.rb
gemsmith-22.8.0 lib/gemsmith/builders/console.rb
gemsmith-22.7.0 lib/gemsmith/builders/console.rb
gemsmith-22.6.0 lib/gemsmith/builders/console.rb
gemsmith-22.5.0 lib/gemsmith/builders/console.rb
gemsmith-22.4.0 lib/gemsmith/builders/console.rb
gemsmith-22.3.0 lib/gemsmith/builders/console.rb
gemsmith-22.2.0 lib/gemsmith/builders/console.rb
gemsmith-22.1.0 lib/gemsmith/builders/console.rb
gemsmith-22.0.0 lib/gemsmith/builders/console.rb