Class: Xing::User
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#name ⇒ Object
String.
-
#profile_image ⇒ Object
String.
-
#url ⇒ Object
String.
Methods inherited from Base
#[], #initialize, lazy_attr_reader
Constructor Details
This class inherits a constructor from Xing::Base
Instance Method Details
#==(other) ⇒ Boolean
23 24 25 |
# File 'lib/xing/user.rb', line 23 def ==(other) super || (other.class == self.class && other.id == self.id) end |
#name ⇒ Object
Returns String.
7 8 9 |
# File 'lib/xing/user.rb', line 7 def name @name ||= @attrs["display_name"] unless @attrs["display_name"].nil? end |
#profile_image ⇒ Object
Returns String.
12 13 14 |
# File 'lib/xing/user.rb', line 12 def profile_image @profile_image ||= @attrs["photo_urls"]["medium_thumb"] unless (@attrs["photo_urls"].nil? || @attrs["photo_urls"]["medium_thumb"].nil?) end |
#url ⇒ Object
Returns String.
17 18 19 |
# File 'lib/xing/user.rb', line 17 def url @profile_url ||= @attrs["permalink"] unless @attrs["permalink"].nil? end |