twitter 5.1.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.yardopts +2 -0
  3. data/CHANGELOG.md +10 -1
  4. data/CONTRIBUTING.md +2 -2
  5. data/README.md +30 -20
  6. data/Rakefile +26 -5
  7. data/lib/twitter/arguments.rb +0 -1
  8. data/lib/twitter/base.rb +13 -16
  9. data/lib/twitter/basic_user.rb +3 -3
  10. data/lib/twitter/client.rb +7 -8
  11. data/lib/twitter/configuration.rb +5 -5
  12. data/lib/twitter/core_ext/enumerable.rb +0 -2
  13. data/lib/twitter/core_ext/kernel.rb +0 -2
  14. data/lib/twitter/creatable.rb +0 -1
  15. data/lib/twitter/cursor.rb +7 -10
  16. data/lib/twitter/direct_message.rb +1 -1
  17. data/lib/twitter/entity/uri.rb +2 -2
  18. data/lib/twitter/enumerable.rb +1 -2
  19. data/lib/twitter/error.rb +4 -6
  20. data/lib/twitter/error/already_favorited.rb +1 -1
  21. data/lib/twitter/error/already_posted.rb +1 -1
  22. data/lib/twitter/error/already_retweeted.rb +1 -1
  23. data/lib/twitter/error/too_many_requests.rb +2 -2
  24. data/lib/twitter/factory.rb +2 -6
  25. data/lib/twitter/geo.rb +1 -1
  26. data/lib/twitter/geo/point.rb +3 -5
  27. data/lib/twitter/geo_factory.rb +1 -5
  28. data/lib/twitter/geo_results.rb +5 -8
  29. data/lib/twitter/identity.rb +1 -2
  30. data/lib/twitter/list.rb +4 -5
  31. data/lib/twitter/media/photo.rb +1 -2
  32. data/lib/twitter/media_factory.rb +1 -5
  33. data/lib/twitter/null_object.rb +4 -6
  34. data/lib/twitter/oembed.rb +1 -1
  35. data/lib/twitter/place.rb +4 -5
  36. data/lib/twitter/profile_banner.rb +1 -3
  37. data/lib/twitter/rate_limit.rb +1 -3
  38. data/lib/twitter/relationship.rb +1 -2
  39. data/lib/twitter/rest/api/direct_messages.rb +13 -14
  40. data/lib/twitter/rest/api/favorites.rb +10 -11
  41. data/lib/twitter/rest/api/friends_and_followers.rb +36 -36
  42. data/lib/twitter/rest/api/help.rb +8 -9
  43. data/lib/twitter/rest/api/lists.rb +62 -63
  44. data/lib/twitter/rest/api/oauth.rb +3 -4
  45. data/lib/twitter/rest/api/places_and_geo.rb +9 -10
  46. data/lib/twitter/rest/api/saved_searches.rb +5 -6
  47. data/lib/twitter/rest/api/search.rb +2 -3
  48. data/lib/twitter/rest/api/spam_reporting.rb +1 -2
  49. data/lib/twitter/rest/api/suggested_users.rb +4 -5
  50. data/lib/twitter/rest/api/timelines.rb +17 -18
  51. data/lib/twitter/rest/api/trends.rb +10 -11
  52. data/lib/twitter/rest/api/tweets.rb +15 -16
  53. data/lib/twitter/rest/api/undocumented.rb +6 -7
  54. data/lib/twitter/rest/api/users.rb +51 -52
  55. data/lib/twitter/rest/api/utils.rb +23 -30
  56. data/lib/twitter/rest/client.rb +8 -9
  57. data/lib/twitter/rest/request/multipart_with_file.rb +0 -1
  58. data/lib/twitter/rest/response/parse_error_json.rb +0 -2
  59. data/lib/twitter/rest/response/parse_json.rb +0 -2
  60. data/lib/twitter/rest/response/raise_error.rb +1 -3
  61. data/lib/twitter/search_results.rb +12 -15
  62. data/lib/twitter/settings.rb +2 -2
  63. data/lib/twitter/size.rb +2 -2
  64. data/lib/twitter/source_user.rb +1 -1
  65. data/lib/twitter/streaming/client.rb +71 -18
  66. data/lib/twitter/streaming/connection.rb +1 -3
  67. data/lib/twitter/streaming/deleted_tweet.rb +8 -0
  68. data/lib/twitter/streaming/event.rb +8 -8
  69. data/lib/twitter/streaming/friend_list.rb +2 -9
  70. data/lib/twitter/streaming/message_parser.rb +13 -7
  71. data/lib/twitter/streaming/response.rb +0 -2
  72. data/lib/twitter/streaming/stall_warning.rb +7 -0
  73. data/lib/twitter/suggestion.rb +0 -1
  74. data/lib/twitter/token.rb +2 -3
  75. data/lib/twitter/trend_results.rb +5 -8
  76. data/lib/twitter/tweet.rb +16 -24
  77. data/lib/twitter/user.rb +30 -32
  78. data/lib/twitter/version.rb +2 -5
  79. data/spec/fixtures/track_streaming_user.json +2 -1
  80. data/spec/helper.rb +6 -2
  81. data/spec/twitter/base_spec.rb +9 -9
  82. data/spec/twitter/basic_user_spec.rb +6 -6
  83. data/spec/twitter/configuration_spec.rb +4 -4
  84. data/spec/twitter/cursor_spec.rb +27 -27
  85. data/spec/twitter/direct_message_spec.rb +36 -36
  86. data/spec/twitter/entity/uri_spec.rb +27 -27
  87. data/spec/twitter/error_spec.rb +21 -21
  88. data/spec/twitter/geo/point_spec.rb +9 -9
  89. data/spec/twitter/geo/polygon_spec.rb +5 -5
  90. data/spec/twitter/geo_factory_spec.rb +7 -7
  91. data/spec/twitter/geo_results_spec.rb +11 -11
  92. data/spec/twitter/geo_spec.rb +5 -5
  93. data/spec/twitter/identifiable_spec.rb +9 -9
  94. data/spec/twitter/list_spec.rb +38 -38
  95. data/spec/twitter/media/photo_spec.rb +54 -54
  96. data/spec/twitter/media_factory_spec.rb +5 -5
  97. data/spec/twitter/null_object_spec.rb +6 -6
  98. data/spec/twitter/oembed_spec.rb +65 -65
  99. data/spec/twitter/place_spec.rb +89 -60
  100. data/spec/twitter/profile_banner_spec.rb +3 -3
  101. data/spec/twitter/rate_limit_spec.rb +18 -18
  102. data/spec/twitter/relationship_spec.rb +16 -16
  103. data/spec/twitter/rest/api/direct_messages_spec.rb +61 -61
  104. data/spec/twitter/rest/api/favorites_spec.rb +93 -93
  105. data/spec/twitter/rest/api/friends_and_followers_spec.rb +349 -349
  106. data/spec/twitter/rest/api/geo_spec.rb +33 -33
  107. data/spec/twitter/rest/api/help_spec.rb +24 -24
  108. data/spec/twitter/rest/api/lists_spec.rb +487 -487
  109. data/spec/twitter/rest/api/oauth_spec.rb +30 -30
  110. data/spec/twitter/rest/api/saved_searches_spec.rb +40 -40
  111. data/spec/twitter/rest/api/search_spec.rb +16 -16
  112. data/spec/twitter/rest/api/spam_reporting_spec.rb +9 -9
  113. data/spec/twitter/rest/api/suggested_users_spec.rb +23 -23
  114. data/spec/twitter/rest/api/timelines_spec.rb +58 -58
  115. data/spec/twitter/rest/api/trends_spec.rb +26 -26
  116. data/spec/twitter/rest/api/tweets_spec.rb +284 -284
  117. data/spec/twitter/rest/api/undocumented_spec.rb +51 -51
  118. data/spec/twitter/rest/api/users_spec.rb +360 -360
  119. data/spec/twitter/rest/client_spec.rb +99 -103
  120. data/spec/twitter/saved_search_spec.rb +16 -16
  121. data/spec/twitter/search_results_spec.rb +44 -44
  122. data/spec/twitter/settings_spec.rb +8 -8
  123. data/spec/twitter/size_spec.rb +5 -5
  124. data/spec/twitter/source_user_spec.rb +6 -6
  125. data/spec/twitter/streaming/client_spec.rb +53 -49
  126. data/spec/twitter/streaming/deleted_tweet_spec.rb +23 -0
  127. data/spec/twitter/streaming/event_spec.rb +20 -22
  128. data/spec/twitter/streaming/friend_list_spec.rb +11 -0
  129. data/spec/twitter/streaming/message_parser_spec.rb +54 -0
  130. data/spec/twitter/suggestion_spec.rb +11 -11
  131. data/spec/twitter/target_user_spec.rb +6 -6
  132. data/spec/twitter/token_spec.rb +4 -4
  133. data/spec/twitter/trend_results_spec.rb +30 -30
  134. data/spec/twitter/trend_spec.rb +20 -20
  135. data/spec/twitter/tweet_spec.rb +170 -173
  136. data/spec/twitter/user_spec.rb +179 -179
  137. data/twitter.gemspec +2 -2
  138. metadata +21 -4
  139. metadata.gz.sig +2 -1
@@ -5,7 +5,7 @@ module Twitter
5
5
  class DirectMessage < Twitter::Identity
6
6
  include Twitter::Creatable
7
7
  attr_reader :text
8
- alias full_text text
8
+ alias_method :full_text, :text
9
9
  object_attr_reader :User, :recipient
10
10
  object_attr_reader :User, :sender
11
11
  end
@@ -7,8 +7,8 @@ module Twitter
7
7
  uri_attr_reader :expanded_uri, :uri
8
8
  end
9
9
 
10
- Uri = URI
11
10
  URL = URI
12
- Url = URI
11
+ Uri = URI # rubocop:disable ConstantName
12
+ Url = URI # rubocop:disable ConstantName
13
13
  end
14
14
  end
@@ -3,13 +3,12 @@ module Twitter
3
3
  include ::Enumerable
4
4
 
5
5
  # @return [Enumerator]
6
- def each(start=0, &block)
6
+ def each(start = 0, &block)
7
7
  return to_enum(:each) unless block_given?
8
8
  Array(@collection[start..-1]).each do |element|
9
9
  yield element
10
10
  end
11
11
  self
12
12
  end
13
-
14
13
  end
15
14
  end
@@ -20,6 +20,7 @@ module Twitter
20
20
  OAUTH_TIMESTAMP_OUT_OF_RANGE = 135
21
21
  FOLLOW_LIMIT_EXCEEDED = 161
22
22
  PROTECTED_STATUS = 179
23
+ OVER_UPDATE_LIMIT = 185
23
24
  DUPLICATE_STATUS = 187
24
25
  BAD_AUTHENTICATION_DATA = 215
25
26
  LOGIN_VERIFICATION_NEEDED = 231
@@ -27,19 +28,18 @@ module Twitter
27
28
  end
28
29
 
29
30
  class << self
30
-
31
31
  # Create a new error from an HTTP response
32
32
  #
33
33
  # @param response [Hash]
34
34
  # @return [Twitter::Error]
35
- def from_response(response={})
35
+ def from_response(response = {})
36
36
  error, code = parse_error(response[:body])
37
37
  new(error, response[:response_headers], code)
38
38
  end
39
39
 
40
40
  # @return [Hash]
41
41
  def errors
42
- @errors ||= descendants.inject({}) do |hash, klass|
42
+ @errors ||= descendants.reduce({}) do |hash, klass|
43
43
  hash[klass::HTTP_STATUS_CODE] = klass
44
44
  hash
45
45
  end
@@ -65,7 +65,6 @@ module Twitter
65
65
  [first.chomp, nil]
66
66
  end
67
67
  end
68
-
69
68
  end
70
69
 
71
70
  # Initializes a new Error object
@@ -74,12 +73,11 @@ module Twitter
74
73
  # @param response_headers [Hash]
75
74
  # @param code [Integer]
76
75
  # @return [Twitter::Error]
77
- def initialize(exception=$!, response_headers={}, code=nil)
76
+ def initialize(exception = $ERROR_INFO, response_headers = {}, code = nil) # rubocop:disable MethodLength
78
77
  @rate_limit = RateLimit.new(response_headers)
79
78
  @wrapped_exception = exception
80
79
  @code = code
81
80
  exception.respond_to?(:message) ? super(exception.message) : super(exception.to_s)
82
81
  end
83
-
84
82
  end
85
83
  end
@@ -4,7 +4,7 @@ module Twitter
4
4
  class Error
5
5
  # Raised when a Tweet has already been favorited
6
6
  class AlreadyFavorited < Twitter::Error::Forbidden
7
- MESSAGE = "You have already favorited this status"
7
+ MESSAGE = 'You have already favorited this status'
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Twitter
4
4
  class Error
5
5
  # Raised when a Tweet has already been posted
6
6
  class AlreadyPosted < Twitter::Error::Forbidden
7
- MESSAGE = "Status is a duplicate"
7
+ MESSAGE = 'Status is a duplicate'
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Twitter
4
4
  class Error
5
5
  # Raised when a Tweet has already been retweeted
6
6
  class AlreadyRetweeted < Twitter::Error::Forbidden
7
- MESSAGE = "sharing is not permissible for this status (Share validations failed)"
7
+ MESSAGE = 'sharing is not permissible for this status (Share validations failed)'
8
8
  end
9
9
  end
10
10
  end
@@ -6,7 +6,7 @@ module Twitter
6
6
  class TooManyRequests < Twitter::Error
7
7
  HTTP_STATUS_CODE = 429
8
8
  end
9
- EnhanceYourCalm = TooManyRequests
10
- RateLimited = TooManyRequests
9
+ EnhanceYourCalm = TooManyRequests # rubocop:disable ConstantName
10
+ RateLimited = TooManyRequests # rubocop:disable ConstantName
11
11
  end
12
12
  end
@@ -1,8 +1,6 @@
1
1
  module Twitter
2
2
  class Factory
3
-
4
3
  class << self
5
-
6
4
  # Construct a new object
7
5
  #
8
6
  # @param method [Symbol]
@@ -10,13 +8,11 @@ module Twitter
10
8
  # @param attrs [Hash]
11
9
  # @raise [IndexError] Error raised when supplied argument is missing a key.
12
10
  # @return [Twitter::Base]
13
- def new(method, klass, attrs={})
11
+ def new(method, klass, attrs = {})
14
12
  type = attrs.fetch(method.to_sym)
15
- const_name = type.gsub(/\/(.?)/){"::#{$1.upcase}"}.gsub(/(?:^|_)(.)/){$1.upcase}
13
+ const_name = type.gsub(/\/(.?)/) { "::#{Regexp.last_match[1].upcase}" }.gsub(/(?:^|_)(.)/) { Regexp.last_match[1].upcase }
16
14
  klass.const_get(const_name.to_sym).new(attrs)
17
15
  end
18
-
19
16
  end
20
-
21
17
  end
22
18
  end
@@ -5,6 +5,6 @@ module Twitter
5
5
  class Geo < Twitter::Base
6
6
  include Equalizer.new(:coordinates)
7
7
  attr_reader :coordinates
8
- alias coords coordinates
8
+ alias_method :coords, :coordinates
9
9
  end
10
10
  end
@@ -3,20 +3,18 @@ require 'twitter/geo'
3
3
  module Twitter
4
4
  class Geo
5
5
  class Point < Twitter::Geo
6
-
7
6
  # @return [Integer]
8
7
  def latitude
9
8
  coordinates[0]
10
9
  end
11
- alias lat latitude
10
+ alias_method :lat, :latitude
12
11
 
13
12
  # @return [Integer]
14
13
  def longitude
15
14
  coordinates[1]
16
15
  end
17
- alias long longitude
18
- alias lng longitude
19
-
16
+ alias_method :long, :longitude
17
+ alias_method :lng, :longitude
20
18
  end
21
19
  end
22
20
  end
@@ -4,19 +4,15 @@ require 'twitter/geo/polygon'
4
4
 
5
5
  module Twitter
6
6
  class GeoFactory < Twitter::Factory
7
-
8
7
  class << self
9
-
10
8
  # Construct a new geo object
11
9
  #
12
10
  # @param attrs [Hash]
13
11
  # @raise [IndexError] Error raised when supplied argument is missing a :type key.
14
12
  # @return [Twitter::Geo]
15
- def new(attrs={})
13
+ def new(attrs = {})
16
14
  super(:type, Geo, attrs)
17
15
  end
18
-
19
16
  end
20
-
21
17
  end
22
18
  end
@@ -4,27 +4,25 @@ module Twitter
4
4
  class GeoResults
5
5
  include Twitter::Enumerable
6
6
  attr_reader :attrs
7
- alias to_h attrs
8
- alias to_hash attrs
9
- alias to_hsh attrs
7
+ alias_method :to_h, :attrs
8
+ alias_method :to_hash, :attrs
9
+ alias_method :to_hsh, :attrs
10
10
 
11
11
  class << self
12
-
13
12
  # Construct a new GeoResults object from a response hash
14
13
  #
15
14
  # @param response [Hash]
16
15
  # @return [Twitter::Base]
17
- def from_response(response={})
16
+ def from_response(response = {})
18
17
  new(response[:body])
19
18
  end
20
-
21
19
  end
22
20
 
23
21
  # Initializes a new GeoResults object
24
22
  #
25
23
  # @param attrs [Hash]
26
24
  # @return [Twitter::GeoResults]
27
- def initialize(attrs={})
25
+ def initialize(attrs = {})
28
26
  @attrs = attrs
29
27
  @collection = Array(@attrs[:result][:places]).map do |place|
30
28
  Place.new(place)
@@ -35,6 +33,5 @@ module Twitter
35
33
  def token
36
34
  @attrs[:token]
37
35
  end
38
-
39
36
  end
40
37
  end
@@ -11,10 +11,9 @@ module Twitter
11
11
  # @param attrs [Hash]
12
12
  # @raise [ArgumentError] Error raised when supplied argument is missing an :id key.
13
13
  # @return [Twitter::Identity]
14
- def initialize(attrs={})
14
+ def initialize(attrs = {})
15
15
  attrs.fetch(:id)
16
16
  super
17
17
  end
18
-
19
18
  end
20
19
  end
@@ -5,7 +5,7 @@ module Twitter
5
5
  class List < Twitter::Identity
6
6
  include Twitter::Creatable
7
7
  attr_reader :description, :following, :full_name, :member_count,
8
- :mode, :name, :slug, :subscriber_count
8
+ :mode, :name, :slug, :subscriber_count
9
9
  object_attr_reader :User, :user
10
10
 
11
11
  # @return [Addressable::URI] The URI to the list members.
@@ -13,21 +13,20 @@ module Twitter
13
13
  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}/members")
14
14
  end
15
15
  memoize :members_uri
16
- alias members_url members_uri
16
+ alias_method :members_url, :members_uri
17
17
 
18
18
  # @return [Addressable::URI] The URI to the list subscribers.
19
19
  def subscribers_uri
20
20
  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}/subscribers")
21
21
  end
22
22
  memoize :subscribers_uri
23
- alias subscribers_url subscribers_uri
23
+ alias_method :subscribers_url, :subscribers_uri
24
24
 
25
25
  # @return [Addressable::URI] The URI to the list.
26
26
  def uri
27
27
  Addressable::URI.parse("https://twitter.com/#{user.screen_name}/#{slug}")
28
28
  end
29
29
  memoize :uri
30
- alias url uri
31
-
30
+ alias_method :url, :uri
32
31
  end
33
32
  end
@@ -11,13 +11,12 @@ module Twitter
11
11
  #
12
12
  # @return [Array<Twitter::Size>]
13
13
  def sizes
14
- Array(@attrs[:sizes]).inject({}) do |object, (key, value)|
14
+ Array(@attrs[:sizes]).reduce({}) do |object, (key, value)|
15
15
  object[key] = Size.new(value)
16
16
  object
17
17
  end
18
18
  end
19
19
  memoize :sizes
20
-
21
20
  end
22
21
  end
23
22
  end
@@ -3,19 +3,15 @@ require 'twitter/media/photo'
3
3
 
4
4
  module Twitter
5
5
  class MediaFactory < Twitter::Factory
6
-
7
6
  class << self
8
-
9
7
  # Construct a new media object
10
8
  #
11
9
  # @param attrs [Hash]
12
10
  # @raise [IndexError] Error raised when supplied argument is missing a :type key.
13
11
  # @return [Twitter::Media]
14
- def new(attrs={})
12
+ def new(attrs = {})
15
13
  super(:type, Media, attrs)
16
14
  end
17
-
18
15
  end
19
-
20
16
  end
21
17
  end
@@ -1,6 +1,5 @@
1
1
  module Twitter
2
2
  class NullObject
3
-
4
3
  # @return [TrueClass] This method always returns true.
5
4
  def nil?
6
5
  true
@@ -12,14 +11,13 @@ module Twitter
12
11
  end
13
12
 
14
13
  # @return [TrueClass] This method always returns true.
15
- def respond_to?(method_name, include_private=false)
14
+ def respond_to?(method_name, include_private = false)
16
15
  true
17
- end if RUBY_VERSION < "1.9"
16
+ end if RUBY_VERSION < '1.9'
18
17
 
19
18
  # @return [TrueClass] This method always returns true.
20
- def respond_to_missing?(method_name, include_private=false)
19
+ def respond_to_missing?(method_name, include_private = false)
21
20
  true
22
- end if RUBY_VERSION >= "1.9"
23
-
21
+ end if RUBY_VERSION >= '1.9'
24
22
  end
25
23
  end
@@ -3,7 +3,7 @@ require 'twitter/base'
3
3
  module Twitter
4
4
  class OEmbed < Twitter::Base
5
5
  attr_reader :author_name, :cache_age, :height, :html, :provider_name,
6
- :type, :version, :width
6
+ :type, :version, :width
7
7
  uri_attr_reader :author_uri, :provider_uri, :uri
8
8
  end
9
9
  end
@@ -4,10 +4,10 @@ require 'twitter/base'
4
4
  module Twitter
5
5
  class Place < Twitter::Base
6
6
  attr_reader :attributes, :country, :full_name, :name, :woeid
7
- alias woe_id woeid
7
+ alias_method :woe_id, :woeid
8
8
  object_attr_reader :GeoFactory, :bounding_box
9
9
  object_attr_reader :Place, :contained_within
10
- alias contained? contained_within?
10
+ alias_method :contained?, :contained_within?
11
11
  uri_attr_reader :uri
12
12
 
13
13
  # @param other [Twitter::Place]
@@ -25,7 +25,7 @@ module Twitter
25
25
 
26
26
  # @return [String]
27
27
  def country_code
28
- @attrs[:country_code] || @attrs[:countryCode]
28
+ @attrs[:country_code] || @attrs[:countryCode] # rubocop:disable SymbolName
29
29
  end
30
30
  memoize :country_code
31
31
 
@@ -37,9 +37,8 @@ module Twitter
37
37
 
38
38
  # @return [String]
39
39
  def place_type
40
- @attrs[:place_type] || @attrs[:placeType] && @attrs[:placeType][:name]
40
+ @attrs[:place_type] || @attrs[:placeType] && @attrs[:placeType][:name] # rubocop:disable SymbolName
41
41
  end
42
42
  memoize :place_type
43
-
44
43
  end
45
44
  end
@@ -2,17 +2,15 @@ require 'twitter/base'
2
2
 
3
3
  module Twitter
4
4
  class ProfileBanner < Twitter::Base
5
-
6
5
  # Returns an array of photo sizes
7
6
  #
8
7
  # @return [Array<Twitter::Size>]
9
8
  def sizes
10
- Array(@attrs[:sizes]).inject({}) do |object, (key, value)|
9
+ Array(@attrs[:sizes]).reduce({}) do |object, (key, value)|
11
10
  object[key] = Size.new(value)
12
11
  object
13
12
  end
14
13
  end
15
14
  memoize :sizes
16
-
17
15
  end
18
16
  end
@@ -1,6 +1,5 @@
1
1
  module Twitter
2
2
  class RateLimit < Twitter::Base
3
-
4
3
  # @return [Integer]
5
4
  def limit
6
5
  limit = @attrs['x-rate-limit-limit']
@@ -26,7 +25,6 @@ module Twitter
26
25
  def reset_in
27
26
  [(reset_at - Time.now).ceil, 0].max if reset_at
28
27
  end
29
- alias retry_after reset_in
30
-
28
+ alias_method :retry_after, :reset_in
31
29
  end
32
30
  end
@@ -9,9 +9,8 @@ module Twitter
9
9
  #
10
10
  # @param attrs [Hash]
11
11
  # @return [Twitter::Relationship]
12
- def initialize(attrs={})
12
+ def initialize(attrs = {})
13
13
  @attrs = attrs[:relationship]
14
14
  end
15
-
16
15
  end
17
16
  end