Module: POI::Utils

Included in:
App
Defined in:
lib/poi/utils.rb

Instance Method Summary collapse

Instance Method Details

#parents(path) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/poi/utils.rb', line 3

def parents(path)
    segs = path.split("/")
    parent_segs = segs[0...-1];
    
    if (parent_segs.empty?)
        return "."
    end
    return parent_segs.join("/")
end