Class: Hashtag
- Inherits:
-
Object
- Object
- Hashtag
- Includes:
- MongoMapper::Document
- Defined in:
- lib/oii_twitter_goodies/model/hashtag.rb
Class Method Summary collapse
Class Method Details
.example ⇒ Object
8 9 10 |
# File 'lib/oii_twitter_goodies/model/hashtag.rb', line 8 def self.example {"text"=>"IDMA", "indices"=>[27, 32]} end |
.new_from_raw(entity, tweet_id) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/oii_twitter_goodies/model/hashtag.rb', line 12 def self.new_from_raw(entity, tweet_id) entity = Hashie::Mash[entity] obj = self.new obj.text = entity["text"] obj.indices = entity["indices"] obj.tweet_id = tweet_id obj.save! obj end |