Skip to content

Instantly share code, notes, and snippets.

@adriand
Created March 15, 2010 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriand/333150 to your computer and use it in GitHub Desktop.
Save adriand/333150 to your computer and use it in GitHub Desktop.
# 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