class Netdocuments::PathFormatter
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/netdocuments/path_formatter.rb, line 5 def initialize(path) @path = path end
Public Instance Methods
format()
click to toggle source
# File lib/netdocuments/path_formatter.rb, line 9 def format arr = @path.split('/') root_node = arr.last arr.pop arr.join(' / ') + " / " + root_node end