-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Twitter::Streaming::FriendList an array
- Loading branch information
Showing
3 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |