Sha256: 965fe7af0b2addade92622b8b316a360994a5307c5f0a22176ebd850d972eb6f
Contents?: true
Size: 832 Bytes
Versions: 12
Compression:
Stored size: 832 Bytes
Contents
h1. About h1. Installation * Prerelease: @gem install media-path --prerelease@ * Stable Version: @gem install media-path@ h1. Setup <pre> MediaMediaPath.media_root = "public" </pre> h2. Rewriting rules <pre> MediaMediaPath.rewrite { |path| "http://media.domain.org/#{path}" } MediaMediaPath.rewrite { |path| path.tr("_", "-") } </pre> h1. Usage <pre> 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" </pre> 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
Version data entries
12 entries across 12 versions & 3 rubygems