Class: Soapstone::Context::GitBranch

Inherits:
Object
  • Object
show all
Defined in:
lib/soapstone/core/context/git_branch.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGitBranch

Returns a new instance of GitBranch.



8
9
10
11
# File 'lib/soapstone/core/context/git_branch.rb', line 8

def initialize
  @config = Soapstone::Config::Load.call
  @current_branch = Soapstone::GitCommand.current_branch
end

Class Method Details

.callObject



4
5
6
# File 'lib/soapstone/core/context/git_branch.rb', line 4

def self.call
  new.call
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
# File 'lib/soapstone/core/context/git_branch.rb', line 13

def call
  BranchContext.new(
    current_branch: current_branch,
    default_branch: default_branch,
    on_default_branch: on_default_branch?
  )
end