Created
March 15, 2010 18:31
-
-
Save adriand/333150 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sure, 'class Tweep' would work too, but no way in hell are we going down that road. | |
class Person | |
include DataMapper::Resource | |
property :id, Serial | |
property :screen_name, String, :unique_index => true | |
property :name, String | |
property :profile_image_url, String | |
# storing these will allow us to rank this person against other users | |
# if we wish, we can also use these as cached results from Twitter if the user | |
# returns to the site within a certain amount of time | |
property :followers_count, Integer | |
property :statuses_count, Integer | |
property :joined_twitter_at, DateTime | |
# storing the created_at timestamp will help us track site participation | |
# in order to have this set for us automatically, we've added: | |
# require 'dm-timestamps' | |
# to the list of required gems. | |
property :created_at, DateTime | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment