Sha256: dd8f8b44f2d2f82852135d1b265bc518205e4e6d98df6d07c3b590730c87041b

Contents?: true

Size: 735 Bytes

Versions: 3

Compression:

Stored size: 735 Bytes

Contents

# frozen_string_literal: true

module PicoApi
  module Generators
    module Commands
      class CreateConfigConfiguration
        def self.call(project_name)
          file_creator = ::PicoApi::Generators::FileCreator.build(project_name)

          new(file_creator).call
        end

        def initialize(file_creator)
          @file_creator = file_creator
        end

        def call
          file_creator.create(template_file_path, destination_path)
        end

        private

        attr_reader :file_creator

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

        def destination_path
          '/config/configuration.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_configuration.rb
pico_api-0.0.6 lib/pico_api/generators/commands/create_config_configuration.rb
pico_api-0.0.5 lib/pico_api/generators/commands/create_config_configuration.rb