lib/roda/plugins/public.rb
# Return an array of segments for the given path, handling ..
# and . components
Return an array of segments for the given path, handling
and . components
Return an array of segments for the given path handling and . components
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
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
Return an array of segments for the given path, handling ..
and .
Return an array of segments for the given path handling .. and .
path