Class: Gempilot::CLI::Commands::Create

Inherits:
Gempilot::CLI::Command show all
Includes:
GemBuilder, Generator
Defined in:
lib/gempilot/cli/commands/create.rb

Overview

Scaffolds a new gem with Zeitwerk autoloading, test framework, RuboCop config, CI workflow, and version management rake tasks.

Instance Attribute Summary

Attributes included from Generator

#template_dir

Instance Method Summary collapse

Methods included from Generator

#chmod, #cp, #create_file, #erb, included, #initialize, #mkdir, #print_action, #sh, #touch

Instance Method Details

#run(gem_name = nil) ⇒ Object



61
62
63
64
65
66
67
# File 'lib/gempilot/cli/commands/create.rb', line 61

def run(gem_name = nil)
  puts colors.bold("Creating gem...")
  puts
  collect_options(gem_name)
  print_header
  scaffold_gem
end