Class: PathUtils

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-binary-cache/helper/path_utils.rb

Overview

Copyright 2019 Grabtaxi Holdings PTE LTE (GRAB), All rights reserved. Use of this source code is governed by an MIT-style license that can be found in the LICENSE file

Class Method Summary collapse

Class Method Details

.remove_last_path_component(path, num_components = 1) ⇒ Object



5
6
7
# File 'lib/cocoapods-binary-cache/helper/path_utils.rb', line 5

def self.remove_last_path_component(path, num_components = 1)
  path.split("/")[0...-num_components].join("/")
end