Class: Rails::Worktrees::ProjectMaintenance

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/worktrees/project_maintenance.rb

Overview

Audits and prepares safe file-based maintenance updates for the current checkout. rubocop:disable Metrics/ClassLength, Metrics/MethodLength, Metrics/AbcSize

Defined Under Namespace

Classes: Check, Report

Constant Summary collapse

TEMPLATE_ROOT =

rubocop:enable Style/RedundantStructKeywordInit

File.expand_path('../../generators/rails/worktrees/templates', __dir__)
FILE_ENCODING =
'UTF-8'.freeze

Instance Method Summary collapse

Constructor Details

#initialize(root:) ⇒ ProjectMaintenance

Returns a new instance of ProjectMaintenance.



53
54
55
# File 'lib/rails/worktrees/project_maintenance.rb', line 53

def initialize(root:)
  @root = root
end

Instance Method Details

#callObject



57
58
59
# File 'lib/rails/worktrees/project_maintenance.rb', line 57

def call
  Report.new(checks: maintenance_checks.compact)
end