Method: Skypager::Protector#normalize_path

Defined in:
lib/skypager/protector.rb

#normalize_path(path) ⇒ Object



62
63
64
65
66
67
68
# File 'lib/skypager/protector.rb', line 62

def normalize_path(path)
  if !path.to_s.match(/\.\w+/)
    path = path.gsub(/\/$/,'') + path_extension
  end

  path.to_s.gsub(/^\//,'')
end