module Ki::Middleware::Helpers::FormatOf

Public Instance Methods

format_of(uri) click to toggle source
# File lib/ki/middleware/helpers/format_of_helper.rb, line 7
def format_of(uri)
  uri = uri.path if uri.class == BaseRequest
  File.extname(URI.parse(uri).path).delete('.')
rescue URI::InvalidURIError
  ''
end