Sha256: 539a32640e7ed3b1396b572031002b917a4129703bc253e87c57712d9c887636

Contents?: true

Size: 698 Bytes

Versions: 3

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

module PicoApi
  module Generators
    module Commands
      class CreateConfigBoot
        def self.call(project_name)
          file_copier = ::PicoApi::Generators::FileCopier.build(project_name)

          new(file_copier).call
        end

        def initialize(file_copier)
          @file_copier = file_copier
        end

        def call
          file_copier.copy(template_file_path, destination_path)
        end

        private

        attr_reader :file_copier

        def template_file_path
          '/generators/templates/config/boot.erb'
        end

        def destination_path
          '/config/boot.rb'
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pico_api-0.1.0 lib/pico_api/generators/commands/create_config_boot.rb
pico_api-0.0.6 lib/pico_api/generators/commands/create_config_boot.rb
pico_api-0.0.5 lib/pico_api/generators/commands/create_config_boot.rb