Class: Git::Lint::Branches::Environments::Local

Inherits:
Object
  • Object
show all
Defined in:
lib/git/lint/branches/environments/local.rb

Overview

Provides local build environment feature branch information.

Instance Method Summary collapse

Constructor Details

#initialize(repository: GitPlus::Repository.new) ⇒ Local

Returns a new instance of Local.



9
10
11
# File 'lib/git/lint/branches/environments/local.rb', line 9

def initialize repository: GitPlus::Repository.new
  @repository = repository
end

Instance Method Details

#commitsObject



17
18
19
# File 'lib/git/lint/branches/environments/local.rb', line 17

def commits
  repository.commits "#{repository.branch_default}..#{name}"
end

#nameObject



13
14
15
# File 'lib/git/lint/branches/environments/local.rb', line 13

def name
  repository.branch_name
end