Class: Rubysmith::Builders::GitHubCI

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysmith/builders/git_hub_ci.rb

Overview

Builds project skeleton GitHub CI template.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration, builder: Builder) ⇒ GitHubCI

Returns a new instance of GitHubCI.



13
14
15
16
# File 'lib/rubysmith/builders/git_hub_ci.rb', line 13

def initialize configuration, builder: Builder
  @configuration = configuration
  @builder = builder
end

Class Method Details

.callObject



11
# File 'lib/rubysmith/builders/git_hub_ci.rb', line 11

def self.call(...) = new(...).call

Instance Method Details

#callObject



18
19
20
21
22
23
# File 'lib/rubysmith/builders/git_hub_ci.rb', line 18

def call
  return configuration unless configuration.build_git_hub_ci

  builder.call(configuration_with_template).render.replace(/\n\n\Z/, "\n")
  configuration
end