Class: PicoApi::Generators::Commands::CreateConfigRu

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_creator) ⇒ CreateConfigRu

Returns a new instance of CreateConfigRu.



13
14
15
# File 'lib/pico_api/generators/commands/create_config_ru.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_ru.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_ru.rb', line 17

def call
  file_creator.create(template_file_path, destination_path)
end