Class: Essence::CLI::Install
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Essence::CLI::Install
- Defined in:
- lib/essence/cli/install.rb
Constant Summary collapse
- BASE_COMPONENT_NAME =
"essence"
- BASE_DEFINITION_PREFIX =
"class Essence::Essence"
- PHLEX_BASE_DEFINITION_PREFIX =
"class Components::Essence"
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/essence/cli/install.rb', line 11 def call(*) puts "> Installing Essence..." puts "> Copying base component to your project" Essence::CLI::Commands.copy_component(component_name: BASE_COMPONENT_NAME) Essence::CLI::Commands.replace_component_contents( component_name: BASE_COMPONENT_NAME, from: BASE_DEFINITION_PREFIX, to: PHLEX_BASE_DEFINITION_PREFIX ) # Essence::CLI::Commands.rename_component_file( # from: Essence::CLI::Commands::DESTINATION_DIR.join("#{BASE_COMPONENT_NAME}.rb"), # to: Essence::CLI::Commands::DESTINATION_DIR.join("essence.rb") # ) puts "> Essence has been successfully installed!" end |