Class: Dependabot::PullRequestCreator::BranchNamer::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/pull_request_creator/branch_namer/base.rb

Direct Known Subclasses

DependencyGroupStrategy, SoloStrategy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dependencies:, files:, target_branch:, separator: "/", prefix: "dependabot", max_length: nil) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
15
16
17
18
# File 'lib/dependabot/pull_request_creator/branch_namer/base.rb', line 10

def initialize(dependencies:, files:, target_branch:, separator: "/",
               prefix: "dependabot", max_length: nil)
  @dependencies  = dependencies
  @files         = files
  @target_branch = target_branch
  @separator     = separator
  @prefix        = prefix
  @max_length    = max_length
end

Instance Attribute Details

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



8
9
10
# File 'lib/dependabot/pull_request_creator/branch_namer/base.rb', line 8

def dependencies
  @dependencies
end

#filesObject (readonly)

Returns the value of attribute files.



8
9
10
# File 'lib/dependabot/pull_request_creator/branch_namer/base.rb', line 8

def files
  @files
end

#max_lengthObject (readonly)

Returns the value of attribute max_length.



8
9
10
# File 'lib/dependabot/pull_request_creator/branch_namer/base.rb', line 8

def max_length
  @max_length
end

#prefixObject (readonly)

Returns the value of attribute prefix.



8
9
10
# File 'lib/dependabot/pull_request_creator/branch_namer/base.rb', line 8

def prefix
  @prefix
end

#separatorObject (readonly)

Returns the value of attribute separator.



8
9
10
# File 'lib/dependabot/pull_request_creator/branch_namer/base.rb', line 8

def separator
  @separator
end

#target_branchObject (readonly)

Returns the value of attribute target_branch.



8
9
10
# File 'lib/dependabot/pull_request_creator/branch_namer/base.rb', line 8

def target_branch
  @target_branch
end