Module: Cats

Defined in:
lib/cats.rb,
lib/cats/cli.rb,
lib/cats/version.rb

Overview

The central module for Cats, a library/tool that does a small number of cat-related tasks

Defined Under Namespace

Classes: CLI

Constant Summary collapse

VERSION =

The version of the Cats gem

'0.1.1'.freeze

Class Method Summary collapse

Class Method Details

.fact(quantity = 1) ⇒ Array

Returns a given number of cat facts, which defaults to 1

TODO: Consider allowing more than 202 cat facts (show duplicates?)

Parameters:

  • quantity (Fixnum) (defaults to: 1)

    the number of cat facts to receive (0-many)

Returns:

  • (Array)

    an Array of Strings of cat facts


20
21
22
# File 'lib/cats.rb', line 20

def fact(quantity = 1)
  @facts.sample quantity
end