Skip to content

Commit

Permalink
Merge pull request #1226 from sul-dlss/rename-path-finder
Browse files Browse the repository at this point in the history
Rename the PathFinder class
  • Loading branch information
justinlittman authored Aug 6, 2024
2 parents e06555d + 8efade5 commit 2119835
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/models/storage_root.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,15 @@ def treeified_id
attr_reader :cocina, :file_name

def path_finder
@path_finder ||= path_finder_class.new(treeified_id:, file_name:, cocina:)
end

def path_finder_class
LegacyPathFinder
@path_finder ||= PathFinder.new(treeified_id:, file_name:, cocina:)
end

def druid_parts
@druid_parts ||= druid.match(DRUID_PARTS_PATTERN)
end

# Calculate file paths in the legacy Stacks structure
class LegacyPathFinder
# Calculate file paths in the Stacks structure (legacy or content-addressable)
class PathFinder
def initialize(treeified_id:, file_name:, cocina:)
@treeified_id = treeified_id
@file_name = file_name
Expand Down

0 comments on commit 2119835

Please sign in to comment.