# Pass in a tweet id to open a link in the text # # :open $xx Earthquake.init do command %r|^:open\s+([^\/\s]+)$|, :as => :open do |m| twitter.status(m[1]).tap do |s| if s["text"] link_match = s["text"].match(/(https?:\/\/\S*)/) if link_match Launchy.open(link_match[0]) else puts "no link found" end end end end end