Class: Xing::User

Inherits:
Base
  • Object
show all
Defined in:
lib/xing/user.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize, lazy_attr_reader

Constructor Details

This class inherits a constructor from Xing::Base

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


23
24
25
# File 'lib/xing/user.rb', line 23

def ==(other)
  super || (other.class == self.class && other.id == self.id)
end

#nameObject

Returns String.

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_imageObject

Returns String.

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

#urlObject

Returns String.

Returns:

  • String



17
18
19
# File 'lib/xing/user.rb', line 17

def url
  @profile_url ||= @attrs["permalink"] unless @attrs["permalink"].nil?
end