Skip to content

Commit

Permalink
Rename the PathFinder class
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Aug 5, 2024
1 parent e06555d commit 8efade5
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 8efade5

Please sign in to comment.