Permalink
Browse files

README

  • Loading branch information...
reiz
reiz committed Jan 8, 2012
1 parent 727129d commit a892d59bc91185084cde21acc2d85affbe4d0fa6
Showing with 24 additions and 3 deletions.
  1. +24 −3 README.markdown
View
@@ -1,14 +1,35 @@
# NaturalSorter
+## The Mission
+
This open source project is sorting arrays in a natural way. Assume you have an string array like this here
-["init30", "init20", "init200"]
+`["init30", "init20", "init200"]`
If you are sorting this in ruby with ".sort" you will get this result
-["init20", "init200", "init30"]
+`["init20", "init200", "init30"]`
Because the default sort method does not recognize the numbers in the string. The NaturalSorter will return this result.
-["init20", "init30", "init200"]
+`["init20", "init30", "init200"]`
+
+## How To Use - Examples
+
+You should add this line to your Gemfile
+
+`gem 'naturalsorter', '0.0.1'`
+
+and run this command in your app root directory
+
+`bundle install`
+
+Than you can use it like this:
+
+`Naturalsorter::Sorter.sort(["c400", "b5", "a1"], true)`
+
+The method head looks like this:
+
+`Naturalsorter::Sorter.sort(array, caseinsesitive)`
+That's it.

0 comments on commit a892d59

Please sign in to comment.