Class: Catsay::CLI
- Inherits:
-
Object
- Object
- Catsay::CLI
- Defined in:
- lib/catsay.rb
Overview
handle CLI stuff
Class Method Summary collapse
-
.run! ⇒ Object
-
parses command-line arguments - finds the cat and makes it meow (or gives an error).
-
Class Method Details
.run! ⇒ Object
-
parses command-line arguments
-
finds the cat and makes it meow (or gives an error)
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/catsay.rb', line 17 def run! @options = parse_arguments if @options[:verbose] p @options end if @options[:cat] == :random @options[:cat] = cats.sample end output_handle.puts Cat.new(:template => template).meow() end |