Sha256: 873a9fbc226354df04933d431dd4773fd36247fd9722c29ab8234e01480880a3

Contents?: true

Size: 178 Bytes

Versions: 110

Compression:

Stored size: 178 Bytes

Contents

module Scrivito
  class ParentPath
    def self.of(path)
      return if path.nil?
      return if path == '/'
      path.gsub(/\/[^\/]+$/, '').presence || '/'
    end
  end
end

Version data entries

110 entries across 110 versions & 1 rubygems

Version Path
scrivito_sdk-0.71.0 lib/scrivito/parent_path.rb
scrivito_sdk-0.71.0.rc2 lib/scrivito/parent_path.rb
scrivito_sdk-0.71.0.rc1 lib/scrivito/parent_path.rb
scrivito_sdk-0.70.0 lib/scrivito/parent_path.rb
scrivito_sdk-0.70.0.rc3 lib/scrivito/parent_path.rb
scrivito_sdk-0.70.0.rc2 lib/scrivito/parent_path.rb
scrivito_sdk-0.70.0.rc1 lib/scrivito/parent_path.rb
scrivito_sdk-0.66.0 lib/scrivito/parent_path.rb
scrivito_sdk-0.66.0.rc2 lib/scrivito/parent_path.rb
scrivito_sdk-0.66.0.rc1 lib/scrivito/parent_path.rb