Class: Git::Lint::Rake::Register

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/git/lint/rake/register.rb

Overview

Registers Rake tasks for use.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(shell: CLI::Shell.new) ⇒ Register

Returns a new instance of Register.



15
16
17
# File 'lib/git/lint/rake/register.rb', line 15

def initialize shell: CLI::Shell.new
  @shell = shell
end

Class Method Details

.callObject



13
# File 'lib/git/lint/rake/register.rb', line 13

def self.call = new.call

Instance Method Details

#callObject



19
20
21
22
# File 'lib/git/lint/rake/register.rb', line 19

def call
  desc "Run Git Lint"
  task(:git_lint) { shell.call %w[analyze --branch] }
end