class Longleaf::PhysicalPathProvider
Provides physical paths for logical paths from a mapping
Public Class Methods
new(phys_mapping = Hash.new)
click to toggle source
@param phys_mapping hash with logical paths as keys, physical paths as values
# File lib/longleaf/candidates/physical_path_provider.rb, line 5 def initialize(phys_mapping = Hash.new) @phys_mapping = phys_mapping end
Public Instance Methods
get_physical_path(logical_path)
click to toggle source
@param logical_path [String] logical path of file @return physical path of the file
# File lib/longleaf/candidates/physical_path_provider.rb, line 11 def get_physical_path(logical_path) # return the logical path itself if no physical path is mapped return logical_path unless @phys_mapping.key?(logical_path) @phys_mapping[logical_path] end