Class: Git::Lint::Branches::Feature

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/git/lint/branches/feature.rb

Overview

Represents a feature branch.

Instance Method Summary collapse

Constructor Details

#initialize(environment: ENV, git_repo: GitPlus::Repository.new) ⇒ Feature

Returns a new instance of Feature.



17
18
19
20
21
22
23
# File 'lib/git/lint/branches/feature.rb', line 17

def initialize environment: ENV, git_repo: GitPlus::Repository.new
  message = "Invalid repository. Are you within a Git-enabled project?"
  fail Errors::Base, message unless git_repo.exist?

  @current_environment = environment
  @selected_environment = load_environment
end