Class: Projects::AllBranchesRule

Inherits:
BranchRule show all
Includes:
CustomBranchRule
Defined in:
app/models/projects/all_branches_rule.rb

Instance Attribute Summary

Attributes inherited from BranchRule

#project, #protected_branch

Instance Method Summary collapse

Methods included from CustomBranchRule

#branch_protection, #created_at, #default_branch?, #group, #initialize, #protected?, #updated_at

Methods inherited from BranchRule

find, #initialize, #protected?

Instance Method Details

#matching_branches_countObject



11
12
13
# File 'app/models/projects/all_branches_rule.rb', line 11

def matching_branches_count
  project.repository.branch_count
end

#nameObject



7
8
9
# File 'app/models/projects/all_branches_rule.rb', line 7

def name
  s_('All branches')
end

#squash_optionObject



15
16
17
# File 'app/models/projects/all_branches_rule.rb', line 15

def squash_option
  project.project_setting
end