README.md in namna-0.0.3 vs README.md in namna-0.0.4
- old
+ new
@@ -1,10 +1,11 @@
+[![Gem Version](https://badge.fury.io/rb/namna.svg)](http://badge.fury.io/rb/namna)
[![Build Status](https://travis-ci.org/kodnin/namna.svg?branch=master)](https://travis-ci.org/kodnin/namna)
# Namna
-Namna is a simple formatted name generator for the command line written in Ruby.
+A name generator written in Ruby.
## Installation
Add this line to your application's Gemfile:
@@ -20,15 +21,27 @@
$ gem install namna
## Usage
-Generate a name by invoking the ```namna``` command with a format argument. For example:
+Require the gem in your project or ```irb``` and generate a name:
- $ namna 'a?*#z'
- => adebz
+```ruby
+require 'namna'
+# => true
+Generator.random
+# => 'nuceop'
+Generator.random(5)
+# => 'xtkna'
+Generator.human
+# => 'fizaze'
+Generator.human(5)
+# => 'oxemo'
+Generator.format('a?*#z')
+# => 'adebz'
+```
-results in a name of five characters starting with an 'a', followed by a random character (?), a vowel (*), a consonant (#) and ending with a 'z'.
+Use the ```random``` method to generate a random name. Specify its length with an optional argument. Use the ```human``` method to generate a humanized random name. Again it is optional to specify a length. Use the ```format``` method to generate a formatted name. A ```?``` is substituted for a random character, a ```*``` is substituted for a vowel and a ```#``` is substituted for a consonant. Non-special characters remain unchanged.
## Contributing
1. Fork it ( https://github.com/kodnin/namna/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)