module Roda::RodaPlugins::Public::RequestMethods
def public_path_segments(path)
Return an array of segments for the given path, handling ..
def public_path_segments(path) segments = [] path.split(SPLIT).each do |seg| next if seg.empty? || seg == '.' seg == '..' ? segments.pop : segments << seg end segments end