Sha256: ff35ac8b7430cbb876077ace3674c00ac9b800e9188d4c426ea38328ba3d8185

Contents?: true

Size: 628 Bytes

Versions: 6

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

module Rubysmith
  module Builders
    # Builds project skeleton console for object inspection and exploration.
    class Console
      def self.call(...) = new(...).call

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

      def call
        return unless configuration.build_console

        builder.call(configuration.with(template_path: "%project_name%/bin/console.erb"))
               .render
               .permit 0o755
      end

      private

      attr_reader :configuration, :builder
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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