Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshed-io/ruby_trollem_ipsum
A Ruby client for http://trollemipsum.appspot.com/
https://github.com/joshed-io/ruby_trollem_ipsum
Last synced: 13 days ago
JSON representation
A Ruby client for http://trollemipsum.appspot.com/
- Host: GitHub
- URL: https://github.com/joshed-io/ruby_trollem_ipsum
- Owner: joshed-io
- License: mit
- Created: 2012-04-06T06:10:42.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-21T01:01:58.000Z (over 10 years ago)
- Last Synced: 2024-10-20T12:18:47.792Z (about 1 month ago)
- Language: Ruby
- Homepage:
- Size: 133 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### ruby_trollem_ipsum
A simple, configurable API client for [trollemipsum.appspot.com](http://trollemipsum.appspot.com).
### Usage
First, require the library:
require 'ruby_trollem_ipsum'
One-liner:
TrollemIpsum.lorem # => "Flash sucks, during delay in getting Ice Cream Sandwich what gorgeous."
Filter options per client:
troll = TrollemIpsum.new(["confident"], ["siegler"])
troll.lorem # => "It’s not good for Google I believe fingergate finally pure bullshit..."Filter options per call:
troll = TrollemIpsum.new
troll.lorem("gruber") # => "Steve Jobs in my opinion baseball."### Installation
Rubygems:
gem install ruby_trollem_ipsum
Bundler:
gem 'ruby_trollem_ipsum'
### Options
The `TrollemIpsum` constructor takes 2 optional parameters - an array of allowable lengths and one of types. See the TrollemIpsum [API](http://trollemipsum.appspot.com/api.json?type=apple&length=new) for a list of allowed values.
If you pass these options, future calls to `lorem` will use them to scope the random selection of types and lengths.
Each call to `lorem` may also pass a length and a type which will override the scoping set on initialization.
### Error messages
*Reason*: All the reasons
*Message*:
trololololololololol
### Credits
Thanks to [@davidmoss](https://twitter.com/davidmoss) and [@patrickhmason](https://twitter.com/patrickhmason) for creating TrollemIpsum!
### Follow me
Follow [@dzello](https://twitter.com/dzello) on twitter for MORE updates and LESS trolling.