Permalink
Browse files

Add usage examples to readme

  • Loading branch information...
1 parent 0d453ba commit 1cf43ae54e26fb7f4638ed97419640f0b7f1310a @jlindley committed May 21, 2008
Showing with 12 additions and 1 deletion.
  1. +12 −1 README.markdown
View
13 README.markdown
@@ -1,4 +1,4 @@
-title_case
+TITLE CASE
===
A port of John Gruber's title casing script to Ruby.
@@ -23,6 +23,17 @@ INSTALL:
Download the tarball for now, will be mirrored to ruby forge shortly.
+
+USAGE
+---
+
+Either create a new instance of TitleClass with the string as an argument, or use the monkeypatched #titlecase method on string objects.
+
+ require 'rubygems'
+ require 'title_case'
+ TitleCase.new("my little string").to_s #=> "My Little String"
+ "a boat, a duck: a bit too much".titlecase #=> "A Boat, a Duck: A Bit Too Much"
+
LICENSE:
---

0 comments on commit 1cf43ae

Please sign in to comment.