Class: RocketApi::RocketCommands
- Inherits:
-
Object
- Object
- RocketApi::RocketCommands
- Extended by:
- Commands::Dirs, Commands::Files, Commands::GemsDir, Commands::Helper, Commands::RackDir, Library::GemRepoPlainText, Library::HelperPlainText, Library::RackRepoPlainText
- Defined in:
- lib/rocket_api/rocket_commands.rb
Class Method Summary collapse
Methods included from Commands::Files
class_name_camel, create_single_file, is_exist?
Methods included from Commands::Dirs
Methods included from Commands::Helper
bin!, gem_file!, gitignore!, rake_file!, readme!
Methods included from Commands::GemsDir
gem_test!, gems_main_file!, gems_version!, gemspec!, rubocop_yml!
Methods included from Commands::RackDir
rack_app!, rack_application!, rack_base_controller!, rack_config_ru!, rack_gemfile!, rack_initializers!, rack_router!, rack_routes!
Methods included from Library::HelperPlainText
Methods included from Library::GemRepoPlainText
gemfile_text, gitignore_text, plain_gem_test_version_text, plain_gemspec_text, plain_rubocop_yml_text, plain_version_text
Methods included from Library::RackRepoPlainText
rack_app_text, rack_application_text, rack_base_controller_text, rack_config_ru, rack_gemfile_text, rack_initializers_text, rack_router_text, rack_routes_text
Class Method Details
.init_dirs(**options) ⇒ Object
23 24 25 26 27 |
# File 'lib/rocket_api/rocket_commands.rb', line 23 def self.init_dirs(**) create_repo([:collection]) rescue StandardError => e raise RocketApi::CreateDirError, "#{RocketApi::CREATE_FAILED} #{e.message}" end |
.init_files(**options) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/rocket_api/rocket_commands.rb', line 31 def self.init_files(**) project_name = [:project_name] [:collection].each { |command| send(command, project_name) } rescue StandardError => e raise RocketApi::InitFilesError, "#{RocketApi::INIT_FAIL} #{e.message}" end |