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

Version Path
media-path-0.1.4 README.textile
media-path-0.1.3 README.textile
media-path-0.1.2 README.textile
media-path-0.2.pre README.textile
pupu-0.0.2.pre vendor/media-path/README.textile
media-path-0.1.1.pre README.textile
media-path-0.1.1 README.textile
pupu-0.0.2 vendor/media-path/README.textile
rango-0.0.6 vendor/media-path/README.textile
rango-0.1.pre vendor/media-path/README.textile
pupu-0.0.1 vendor/media-path/README.textile
media-path-0.1 README.textile