• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

samvera / hydra-pcdm / 65136fe3-7459-42d0-8dcf-fad3664e0817

21 Apr 2023 06:52PM UTC coverage: 72.072% (-27.9%) from 100.0%
65136fe3-7459-42d0-8dcf-fad3664e0817

push

circleci

web-flow
Release 1.3.0 (#299)

160 of 222 relevant lines covered (72.07%)

8.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.56
/lib/hydra/pcdm/ancestor_checker.rb
1
module Hydra::PCDM
12✔
2
  ##
3
  # Checks whether or not one object is an ancestor of another.
4
  module AncestorChecker
12✔
5
    # @param options [Hash]
6
    # @option record [#pcdm_behavior?]
7
    # @option potential_ancestor [#pcdm_behavior?]
8
    # @return Boolean
9
    def self.former_is_ancestor_of_latter?(potential_ancestor, record)
12✔
10
      return true if record == potential_ancestor
×
11
      return false unless potential_ancestor.respond_to?(:members)
×
12
      return true if Array.wrap(potential_ancestor.members).detect { |member| former_is_ancestor_of_latter?(member, record) }
×
13
      false
×
14
    end
15
    class << self
12✔
16
      alias call former_is_ancestor_of_latter?
12✔
17
    end
18
  end
19
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc