Class: Augury::CLI
- Inherits:
-
Thor
- Object
- Thor
- Augury::CLI
- Defined in:
- lib/augury/cli.rb
Instance Method Summary collapse
Instance Method Details
#generate(username, *path) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/augury/cli.rb', line 61 def generate(username, *path) path = File.(path[0] || username) augury = Augury::Fortune.new(username, path, ) augury.twitter_setup augury.retrieve_tweets augury.write_fortune say "Fortune written out to #{path}" rescue StandardError => e say 'There was an error running the command. Details below:' say e. puts e.backtrace if [:debug] exit 1 end |