module Rack::Bunto::Utils
Public Class Methods
file_info(path)
click to toggle source
# File lib/rack/bunto/utils.rb, line 11 def self.file_info(path) info = { :body => ::File.read(path), :time => ::File.mtime(path).httpdate } info end
media_type(filename)
click to toggle source
# File lib/rack/bunto/utils.rb, line 5 def self.media_type(filename) extension = ::File.extname(filename) Rack::Mime.mime_type(extension) end