Method: ViewAssets::PathInfo#depth

Defined in:
lib/view_assets/path_info.rb

#depthObject

PathInfo.new(‘lib/javascripts/file.js’).depth # => 0 PathInfo.new(‘app/javascripts/controller/action/file.js’).depth # => 2 PathInfo.new(‘/path/to/my/app/public/lib/javascripts/file.js’).depth # => 0



74
75
76
# File 'lib/view_assets/path_info.rb', line 74

def depth
  rel.count("/") - 2
end