h1. About h1. Installation * Prerelease: @gem install media-path --prerelease@ * Stable Version: @gem install media-path@ h1. Setup
MediaMediaPath.media_root = "public"
h2. Rewriting rules
MediaMediaPath.rewrite { |path| "http://media.domain.org/#{path}" }
MediaMediaPath.rewrite { |path| path.tr("_", "-") }
h1. Usage
path = MediaMediaPath.new("public/javascripts/mootools-core.js")

path.relative
# => "public/javascripts/mootools-core.js"

path.absolute
# => "/Users/botanicus/projects/webs/myproject/public/javascripts/mootools-core.js"

path.server
# => "/javascripts/mootools-core.js"
h1. Links - "Source Code":http://github.com/botanicus/media-path - "RunCodeRun":http://runcoderun.com/botanicus/media-path - "API Documentation":http://rdoc.info/projects/botanicus/media-path