MonkeyString
Some neat monkey patches on Ruby's beloved String class.
Installation
Add this line to your application's Gemfile:
gem 'monkey_string'
And then execute:
$ bundle
Or install it yourself as:
$ gem install monkey_string
Usage
Random String Generator
String.random
String.random size: 7
String.random size: 7, mixed_cased: true
String.random size: 7, alphanumeric: true
'as4vLm2W'.random
String Introspection
'asd'.mixed_case?
'asd'.upcased?
'asd'.downcased?
'asd'.alphanumeric?
'asd123'.alphanumeric?
'asd'.numeric?
'123'.numeric?
'asd123'.to_alpha
'asd123'.num_alpha
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request