Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update README

  • Loading branch information...
commit c4e9458c8142be1a3ee112c4d07aca8590d9bc3f 1 parent 6be036a
@seejohnrun seejohnrun authored
Showing with 49 additions and 2 deletions.
  1. +21 −0 LICENSE
  2. +28 −2 README.md
View
21 LICENSE
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (c) 2012 John Crepezzi, Broadstreet Ads
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
View
30 README.md
@@ -6,8 +6,17 @@ It can be a huge pain to build arguments for an external command.
There's all of those annoying escaping issues, and you just shouldn't
have to deal with that crap.
-Argh makes it easy to define how to serialize some attributes. Just
-include `Argh::Attributable` into any Ruby class, and you're off to
+Argh makes it easy to define how to serialize those attributes.
+
+## Installation
+
+``` bash
+gem install argh
+```
+
+## Usage
+
+Just include `Argh::Attributable` into any Ruby class, and you're off to
the races.
``` ruby
@@ -32,3 +41,20 @@ end
Thing.new.command_attributes # "-name 'Heyoo' -reverse_name 'ooyeH'"
```
+
+The default formatter is built to work
+with [JCommander](http://jcommander.org/),
+but it's very easy to add and use your own formatters. For an example,
+check out the [JCommanderFormatter](https://github.com/broadstreetads/argh/blob/master/lib/argh/formatters/jcommander_formatter.rb)
+implementation. To use them, you can just pass a second argument to `argh`,
+like:
+
+``` ruby
+argh 'your_name', SomeOtherFormatter do
+ # ...
+end
+```
+
+## License
+
+See LICENSE
Please sign in to comment.
Something went wrong with that request. Please try again.