twitter 5.1.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +4 -0
- data/lib/twitter/place.rb +13 -1
- data/lib/twitter/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +1 -3
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
5.1.1
|
2
|
+
-----
|
3
|
+
* [Custom equalizer for `Twitter::Place`](https://github.com/sferik/twitter/commit/79c76a9bed4f0170c8c09fe38ad4f0ee6aa4505e)
|
4
|
+
|
1
5
|
5.1.0
|
2
6
|
-----
|
3
7
|
* [Use `Addressable::URI` everywhere](https://github.com/sferik/twitter/commit/97d7c68900c9974a1f6841f6eed2706df9030d64) ([@matthewrudy](https://twitter.com/matthewrudy))
|
data/lib/twitter/place.rb
CHANGED
@@ -3,7 +3,6 @@ require 'twitter/base'
|
|
3
3
|
|
4
4
|
module Twitter
|
5
5
|
class Place < Twitter::Base
|
6
|
-
include Equalizer.new(:woeid)
|
7
6
|
attr_reader :attributes, :country, :full_name, :name, :woeid
|
8
7
|
alias woe_id woeid
|
9
8
|
object_attr_reader :GeoFactory, :bounding_box
|
@@ -11,6 +10,19 @@ module Twitter
|
|
11
10
|
alias contained? contained_within?
|
12
11
|
uri_attr_reader :uri
|
13
12
|
|
13
|
+
# @param other [Twitter::Place]
|
14
|
+
# @return [Boolean]
|
15
|
+
def eql?(other)
|
16
|
+
super || instance_of?(other.class) && !woeid.nil? && other.respond_to?(:woeid) && woeid.eql?(other.woeid)
|
17
|
+
end
|
18
|
+
|
19
|
+
# @param other [Twitter::Place]
|
20
|
+
# @return [Boolean]
|
21
|
+
def ==(other)
|
22
|
+
other = coerce(other) if respond_to?(:coerce, true)
|
23
|
+
super || kind_of?(self.class) && !woeid.nil? && other.respond_to?(:woeid) && woeid == other.woeid
|
24
|
+
end
|
25
|
+
|
14
26
|
# @return [String]
|
15
27
|
def country_code
|
16
28
|
@attrs[:country_code] || @attrs[:countryCode]
|
data/lib/twitter/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED