Sha256: 9949e7e6f8f118d9ba6e378e3a7f38538d2c72aadbdeecc90663eaef0f9481dc

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 Bytes

Contents

require 'cat_ipsum/version'
require 'cat_ipsum/cat_actions'

module CatIpsum
  extend self

  def sentence
    result = []
    rand(1..5).times do
      result << CAT_ACTIONS.sample
    end
    result.join(', ').capitalize
  end

  alias phrase sentence

  def sentences(sentence_count = 5)
    (1..sentence_count).map { sentence }
  end

  alias phrases sentences

  def paragraph
    sentences.join('. ')
  end

  def paragraphs(paragraph_count = 5)
    (1..paragraph_count).map { paragraph }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cat_ipsum-0.1.1 lib/cat_ipsum.rb