Class: PicoApi::Generators::Commands::CreateConfigConfiguration

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_creator) ⇒ CreateConfigConfiguration

Returns a new instance of CreateConfigConfiguration.



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

def initialize(file_creator)
  @file_creator = file_creator
end

Class Method Details

.call(project_name) ⇒ Object



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

def self.call(project_name)
  file_creator = ::PicoApi::Generators::FileCreator.build(project_name)

  new(file_creator).call
end

Instance Method Details

#callObject



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

def call
  file_creator.create(template_file_path, destination_path)
end