Sha256: 905c3f137c33cb43daf18d7a7bc687ed957361b11a9a8e00a70c490237c0dd39

Contents?: true

Size: 1.77 KB

Versions: 1

Compression:

Stored size: 1.77 KB

Contents

# CatIpsum

This gem generates fake text based on cats' typical activities. Just use it like another Lorem Ipsum version.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cat_ipsum'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install cat_ipsum

## Usage

#### Methods

```ruby
CatIpsum.sentence
# => "Swat at dog, inspect anything brought into the house, play time"

CatIpsum.paragraph
# => "Shake treat bag, chase imaginary bugs, why must they do that. Nap all day, stand in doorway, yawn so much. Play time, chew ipad power cord, ignore the human. Need to chase tail, hide when guests come over, throwup on your pillow. Hate dog, mark territory, go crazy"
```

`CatIpsum.sentences` and `CatIpsum.paragraphs` returns arrays of their original methods.

All of the methods could take integer parameter to configure count of sentence parts or elements in array.
Some examples:

```ruby
CatIpsum.sentence(1)
# => "Stand in front of the computer screen."

CatIpsum.sentence(2)
# => "Get on the high shelf, swat at dog."

CatIpsum.sentences(1)
#=> ["Play time, stretch, need to chase tail."]

CatIpsum.sentences(2)
#=> ["Sleep on keyboard, intently stare at the same spot, sweet beast.", "Intrigued by the shower, rub face on everything, burrow under covers."]

```

`CatIpsum.phrase` and `CatIpsum.phrases` are aliases to `CatIpsum.sentence` and `CatIpsum.sentence`.

#### Working with randomizing seeds

You can specify your seed to generate repeatable data. Also, seed can be reseted by `CatIpsum.reset!` method.
Example:

```ruby
CatIpsum.sentence
# => "Leave hair everywhere, shake treat bag, missing until dinner time"
CatIpsum::Random.reset!
# => true
CatIpsum.sentence
# => "Leave hair everywhere, shake treat bag, missing until dinner time"
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cat_ipsum-0.2.2 README.md