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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cli, configuration: {}) ⇒ Base

Returns a new instance of Base.



9
10
11
12
# File 'lib/gemsmith/generators/base.rb', line 9

def initialize cli, configuration: {}
  @cli = cli
  @configuration = configuration
end

Class Method Details

.run(cli, configuration: {}) ⇒ Object



14
15
16
# File 'lib/gemsmith/generators/base.rb', line 14

def self.run cli, configuration: {}
  new(cli, configuration: configuration).run
end

Instance Method Details

#runObject



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

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