Class: Gemsmith::Generators::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/gemsmith/generators/base.rb

Overview

Abstract class from which all generators inherit from.

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

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

#runObject



19
20
21
# File 'lib/gemsmith/generators/base.rb', line 19

def run
  fail NotImplementedError, "The method, #run, is not implemented yet."
end