Class: PicoApi::Generators::Commands::CreateGitignore

Inherits:
Object
  • Object
show all
Defined in:
lib/pico_api/generators/commands/create_gitignore.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_copier) ⇒ CreateGitignore

Returns a new instance of CreateGitignore.



13
14
15
# File 'lib/pico_api/generators/commands/create_gitignore.rb', line 13

def initialize(file_copier)
  @file_copier = file_copier
end

Class Method Details

.call(project_name) ⇒ Object



7
8
9
10
11
# File 'lib/pico_api/generators/commands/create_gitignore.rb', line 7

def self.call(project_name)
  file_copier = ::PicoApi::Generators::FileCopier.build(project_name)

  new(file_copier).call
end

Instance Method Details

#callObject



17
18
19
# File 'lib/pico_api/generators/commands/create_gitignore.rb', line 17

def call
  file_copier.copy(template_file_path, destination_path)
end