Class: Rsodx::Cli::Commands::Scaffold
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Rsodx::Cli::Commands::Scaffold
- Includes:
- ScaffoldCommon
- Defined in:
- lib/rsodx/cli/commands/scaffold.rb
Constant Summary
Constants included from ScaffoldCommon
Rsodx::Cli::Commands::ScaffoldCommon::APP, Rsodx::Cli::Commands::ScaffoldCommon::APP_CONTROLLER, Rsodx::Cli::Commands::ScaffoldCommon::APP_PRESENTER, Rsodx::Cli::Commands::ScaffoldCommon::APP_SERIALIZER, Rsodx::Cli::Commands::ScaffoldCommon::APP_SERVICE, Rsodx::Cli::Commands::ScaffoldCommon::BINRSODX, Rsodx::Cli::Commands::ScaffoldCommon::CONFIGRU, Rsodx::Cli::Commands::ScaffoldCommon::CONSOLE, Rsodx::Cli::Commands::ScaffoldCommon::ENVFILE, Rsodx::Cli::Commands::ScaffoldCommon::ENV_LOADER, Rsodx::Cli::Commands::ScaffoldCommon::FOLDERS, Rsodx::Cli::Commands::ScaffoldCommon::GEMFILE, Rsodx::Cli::Commands::ScaffoldCommon::GITIGNORE, Rsodx::Cli::Commands::ScaffoldCommon::RAKEFILE, Rsodx::Cli::Commands::ScaffoldCommon::ROUTE, Rsodx::Cli::Commands::ScaffoldCommon::RUBY_VERSION
Instance Method Summary collapse
Instance Method Details
#call(arg) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rsodx/cli/commands/scaffold.rb', line 11 def call(arg) @name = arg[:name] @app_path = File.join(Dir.pwd, @name) puts "🚀 Creating project: #{@name}" create_folders create_files puts "✅ Done! Your project is ready at #{@app_path}" rescue => e abort "❌ Failed to scaffold: #{e.}" end |