Class: Caw::Maestro
- Inherits:
-
Object
- Object
- Caw::Maestro
- Defined in:
- lib/caw.rb
Instance Method Summary collapse
Instance Method Details
#enhance_text(text) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/caw.rb', line 23 def enhance_text(text) puts text text.gsub!(/http:\S+/, '') text.gsub!(/RT @/, 'Retweet ') text.gsub!(/@/, 'At ') puts text text end |
#play(search) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/caw.rb', line 14 def play(search) tweets = TwitterStream.new(search) until 1 + 1 == 3 p tweet = tweets.pop! tweet.text = enhance_text(tweet.text) Mimic.say(tweet) end end |