Class: Cats::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/cats/cli.rb

Overview

The command line interface for Cats. Uses Thor to map each method to a command.

Instance Method Summary collapse

Instance Method Details

#factObject

Acts as the UI for Cats.fact by showing each cat fact on a new line of text



15
16
17
18
# File 'lib/cats/cli.rb', line 15

def fact
  facts = Cats.fact quantity
  facts.each { |fact| puts fact }
end