lib/pupil/schemes.rb in pupil-0.1.2 vs lib/pupil/schemes.rb in pupil-0.1.3

- old
+ new

@@ -72,11 +72,11 @@ @profile_text_color = j["profile_text_color"] @profile_use_background_image = j["profile_use_background_image"] @protected = j["protected"] @screen_name = j["screen_name"] @show_all_inline_media = j["show_all_inline_media"] - @status = Status.new j["status"] + @status = Pupil::Status.new j["status"] rescue nil @statuses_count = j["statuses_count"] @time_zone = j["time_zone"] @url = j["url"] @utc_offset = j["utc_offset"] @verified = j["verified"] @@ -136,11 +136,11 @@ @retweeted = j["retweeted"] j["source"] =~ /href=\"(.+?)\".+?>(.+?)</ @source = {:url => $1, :name => $2} @text = j["text"] @truncated = j["truncated"] - @user = User.new j["user"] rescue nil + @user = Pupil::User.new j["user"] rescue nil end end class List attr_reader :id @@ -164,23 +164,23 @@ @subscriber_count = element.elements['subscriber_count'].text() @member_count = element.elements['member_count'].text() @uri = element.elements['uri'].text() @following = element.elements['following'].text() @mode = element.elements['mode'].text() - @user = User.new(element.elements['user']) + @user = Pupil::User.new(element.elements['user']) end end class Entities attr_reader :user_mentions attr_reader :urls attr_reader :hashtags def initialize(element) @user_mentions = UserMention.new(element.elements['user_mention']) - @urls = URL.new(element.elements['urls']) - @hashtags = Hashtag.new(element.elements['hashtags']) + @urls = Pupil::URL.new(element.elements['urls']) + @hashtags = Pupil::Hashtag.new(element.elements['hashtags']) end end class Hashtag attr_reader :text @@ -211,10 +211,10 @@ @text = element.elements['text'].text() @recipient_id = element.elements['recipient_id'].text() @created_at = element.elements['created_at'].text() @sender_screen_name = element.elements['sender_screen_name'].text() @recipient_screen_name= element.elements['recipient_screen_name'].text() - @sender = User.new(element.elements['sender']) - @recipient = User.new(element.elements['recipient']) + @sender = Pupil::User.new(element.elements['sender']) + @recipient = Pupil::User.new(element.elements['recipient']) end end end \ No newline at end of file