Quotey
A gem for generating random quotes
Installation
$ gem install quotey
Usage
Basic usage
my_quote_object = Quotey::Quoter.new
my_quote_object.get_quote
=> "\"In the depths of winter I finally learned there was in me an invincible summer.\" - Albert Camus"
Custom behavior
Quotey can receive an options hash:
- :file
- :no_repeat
Using Different file
my_quote_object = Quotey::Quoter.new(file: "/path/to/my/text/file.txt")
Lines are delimited per \n.
No repeating
Want to make sure you get a fresh quote everytime? Worry not!
my_quote_object = Quotey::Quoter.new(no_repeat: true)
Note that once Quotey finishes the list it re-reads the file that was given during the instantiation.
Future plans / TODO
- Consider using Thor for the CLI interface
- Consider switching the class interface to class methods/variables
- CLI testing (using Aruba or RSpec)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request