Skip to content

Instantly share code, notes, and snippets.

@mrflip
Created June 23, 2009 22:35
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 mrflip/134898 to your computer and use it in GitHub Desktop.
Save mrflip/134898 to your computer and use it in GitHub Desktop.
module Wuclan::Models
#
# Text and metadata for a twitter status update
#
class Tweet < TypedStruct.new(
:id,
:created_at,
:twitter_user_id,
:favorited,
:truncated,
:in_reply_to_user_id,
:in_reply_to_status_id,
:text,
:source )
include ModelCommon
def decoded_text
@decoded_text ||= text.wukong_decode
end
# Key on id
def num_key_fields() 1 end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment