Skip to content

Commit

Permalink
updates to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartmckee committed Aug 4, 2010
1 parent c652ee0 commit e60ac3b
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,27 @@ uri = absol.url(relative_url)

h3. Methods

h4. new
h4. new(base_url, options)

Creates a new absolutize object based on a base_url

example
* base_url - This is the base url for the absolutize method, it should either be the url of the current page or if a base tag is supplied it should be the href attribute of the base tag

h5. base_url
* options - Options are passed in as a hash,
* :remove_anchors - removes any anchor tags (false)
* :force_escaping - forces escaping of urls if it hasn't been done already (true)

bq. new("http://www.vamosa.com/mainfolder/", :remove_anchors => true) -

This is the base url for the absolutize method, it should either be the url of the current page or if a base tag is supplied it should be the href attribute of the base tag

h5. options

Options are passed in as a hash,
* :remove_anchors - removes any anchor tags (false)
* :force_escaping - forces escaping of urls if it hasn't been done already (true)

bq. new("http://www.vamosa.com/", :remove_anchors => true) -

h4. url
h4. url(rel_url)

Absolutizes the url that is passed in based on the options that have already been configured

h5. rel_url

The url to absolutize, this is the url that is used on the page and should be absolutized in relation to the base url.

example

bq. url(rel_url) - absolutizes the relative_url based on the base_url
bq. url("subfolder/index.html") - absolutizes the relative_url based on the base_url


h2. License
Expand Down

0 comments on commit e60ac3b

Please sign in to comment.