Skip to content

Commit

Permalink
Make Twitter::Streaming::FriendList an array
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Nov 29, 2013
1 parent 391629f commit 1a38e5e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion etc/erd.dot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 2 additions & 9 deletions lib/twitter/streaming/friend_list.rb
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions spec/twitter/streaming/friend_list_spec.rb
Original file line number Diff line number Diff line change
@@ -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.