Skip to content
Browse files

Make Twitter::Streaming::FriendList an array

  • Loading branch information...
1 parent 391629f commit 1a38e5e8182823c3060fc59c270ef754bd49a179 @sferik committed Nov 29, 2013
Showing with 14 additions and 10 deletions.
  1. +1 −1 etc/erd.dot
  2. +2 −9 lib/twitter/streaming/friend_list.rb
  3. +11 −0 spec/twitter/streaming/friend_list_spec.rb
View
2 etc/erd.dot
@@ -143,7 +143,7 @@ digraph classes {
Twitter__Streaming__Client -> Twitter__Client
Twitter__Streaming__Connection -> Object
Twitter__Streaming__Event -> Object
- Twitter__Streaming__FriendList -> Object
+ Twitter__Streaming__FriendList -> Array
Twitter__Streaming__MessageParser -> Object
Twitter__Streaming__Response -> Object
Twitter__Suggestion -> Twitter__Base
View
11 lib/twitter/streaming/friend_list.rb
@@ -1,13 +1,6 @@
module Twitter
module Streaming
- class FriendList
-
- attr_reader :friend_ids
-
- # @param friend_ids [Array]
- def initialize(friend_ids)
- @friend_ids = friend_ids
- end
+ class FriendList < Array
end
end
-end
+end
View
11 spec/twitter/streaming/friend_list_spec.rb
@@ -0,0 +1,11 @@
+require 'helper'
+
+describe Twitter::Streaming::FriendList do
+
+ it "is an array" do
+ friend_list = Twitter::Streaming::FriendList.new([1, 2, 3])
+ expect(friend_list).to be_an Array
+ expect(friend_list.first).to eq(1)
+ end
+
+end

0 comments on commit 1a38e5e

Please sign in to comment.
Something went wrong with that request. Please try again.