sferik/twitter — pull request #522 by spagalloco (2014-01-25 03:24:37+00:00)
Title: added Twitter::Entities#entity_types

A recent issue on TweetStream (tweetstream/tweetstream#157) made me realize that it's difficult to know which entities are included with a Tweet. You can of course check each type to see if they contain any data, but I thought it would useful to have a simple way of getting the types.

Twitter's docs have no term for what these are, so I chose to call them types. Here's the usage:

```ruby
tweet.entity_types
# => [:urls, :symbols, :hashtags]
```

I toyed with the idea of also adding methods for each type as well (`#hashtags?`, `#uris?`, etc.) but those seem frivolous.