Class: Gempilot::CLI::Commands::New
- Inherits:
-
Gempilot::CLI::Command
- Object
- CommandKit::Command
- Gempilot::CLI::Command
- Gempilot::CLI::Commands::New
- Includes:
- GemContext, Generator
- Defined in:
- lib/gempilot/cli/commands/new.rb
Overview
Generates a new class, module, or command inside an existing gem.
Instance Attribute Summary
Attributes included from Generator
Instance Method Summary collapse
Methods included from Generator
#chmod, #cp, #create_file, #erb, included, #initialize, #mkdir, #print_action, #sh, #touch
Instance Method Details
#run(type = nil, path = nil) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/gempilot/cli/commands/new.rb', line 29 def run(type = nil, path = nil) type ||= prompt_for_type detect_gem_context path ||= prompt_for_path dispatch_add(type, path) end |