lib/relaton_iso/iso_bibliography.rb in relaton-iso-1.14.1 vs lib/relaton_iso/iso_bibliography.rb in relaton-iso-1.14.2

- old
+ new

@@ -98,10 +98,21 @@ return !pubid.part.nil? if all_parts query_pubid.part == pubid.part end + # + # Matches base of query_pubid and pubid. + # + # @param [Pubid::Iso::Identifier] query_pubid pubid to match + # @param [Pubid::Iso::Identifier] pubid pubid to match + # @param [Boolean] any_types_stages match with any types and stages + # + # @return [<Type>] <description> + # def matches_base?(query_pubid, pubid, any_types_stages: false) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics?PerceivedComplexity + return unless pubid + query_pubid.publisher == pubid.publisher && query_pubid.number == pubid.number && query_pubid.copublisher == pubid.copublisher && ((any_types_stages && query_pubid.stage.nil?) || query_pubid.stage == pubid.stage) && ((any_types_stages && query_pubid.type.nil?) || query_pubid.type == pubid.type)