Class: Gemsmith::Generators::Base
- Inherits:
-
Object
- Object
- Gemsmith::Generators::Base
- Defined in:
- lib/gemsmith/generators/base.rb
Overview
Abstract class from which all generators inherit from.
Direct Known Subclasses
Bundler, BundlerAudit, CLI, CircleCI, CodeClimate, Documentation, Engine, Gem, Git, GitCop, GitHub, Guard, Pragma, Rake, Reek, Rspec, Rubocop, Ruby
Constant Summary collapse
- LIB_ROOT =
File.join("%gem_name%", "lib").freeze
- LIB_ROOT_GEM =
File.join(LIB_ROOT, "%gem_path%").freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cli, configuration: {}) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize(cli, configuration: {}) ⇒ Base
Returns a new instance of Base.
10 11 12 13 |
# File 'lib/gemsmith/generators/base.rb', line 10 def initialize cli, configuration: {} @cli = cli @configuration = configuration end |
Class Method Details
.run(cli, configuration: {}) ⇒ Object
15 16 17 |
# File 'lib/gemsmith/generators/base.rb', line 15 def self.run cli, configuration: {} new(cli, configuration: configuration).run end |
Instance Method Details
#run ⇒ Object
19 20 21 |
# File 'lib/gemsmith/generators/base.rb', line 19 def run fail NotImplementedError, "The method, #run, is not implemented yet." end |