Sha256: 38b73d94ff0b803a8299ac34d2b60813add17d3ef5a140dd8b0cb135f9cadb27

Contents?: true

Size: 684 Bytes

Versions: 3

Compression:

Stored size: 684 Bytes

Contents

# frozen_string_literal: true

module PicoApi
  module Generators
    module Commands
      class CreateGemfile
        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/Gemfile.erb'
        end

        def destination_path
          '/Gemfile'
        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_gemfile.rb
pico_api-0.0.6 lib/pico_api/generators/commands/create_gemfile.rb
pico_api-0.0.5 lib/pico_api/generators/commands/create_gemfile.rb