Sha256: e8f0698ee32be16685633318e791c6371ba46affb43b3cf05b79515791b0f260
Contents?: true
Size: 803 Bytes
Versions: 5
Compression:
Stored size: 803 Bytes
Contents
# frozen_string_literal: true module Git class GitConflict attr_reader :repository_name, :branch_a, :branch_b, :conflicting_files def initialize(repository_name, branch_a, branch_b, conflicting_files) unless conflicting_files.present? raise ArgumentError, 'Must specify conflicting file list' end @repository_name = repository_name @branch_a = branch_a @branch_b = branch_b @conflicting_files = conflicting_files end def ==(other) repository_name == other.repository_name \ && branch_a == other.branch_a \ && branch_b == other.branch_b \ && conflicting_files == other.conflicting_files end def contains_branch(branch_name) branch_a == branch_name || branch_b == branch_name end end end
Version data entries
5 entries across 5 versions & 1 rubygems