Class: Yammer::User
- Inherits:
-
Object
- Object
- Yammer::User
- Defined in:
- lib/yammer/user.rb
Instance Attribute Summary collapse
-
#birth_date ⇒ Object
readonly
Returns the value of attribute birth_date.
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#full_user ⇒ Object
readonly
Returns the value of attribute full_user.
-
#hire_date ⇒ Object
readonly
Returns the value of attribute hire_date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#job_title ⇒ Object
readonly
Returns the value of attribute job_title.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#mugshot_url ⇒ Object
readonly
Returns the value of attribute mugshot_url.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#network_name ⇒ Object
readonly
Returns the value of attribute network_name.
-
#stats ⇒ Object
readonly
Returns the value of attribute stats.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#web_url ⇒ Object
readonly
Returns the value of attribute web_url.
Instance Method Summary collapse
-
#initialize(u, c) ⇒ User
constructor
A new instance of User.
- #me? ⇒ Boolean
- #network_id ⇒ Object
Constructor Details
#initialize(u, c) ⇒ User
Returns a new instance of User.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/yammer/user.rb', line 7 def initialize(u, c) @client = c @id = u['id'] @url = u['url'] @web_url = u['web_url'] @name = u['name'] @full_name = u['full_name'] @mugshot_url = u['mugshot_url'] @job_title = u['job_title'] # These attributes will be nil when User is a reference @network_id = u['network_id'] @location = u['location'] @stats = u['stats'] @contact = u['contact'] @hire_date = u['hire_date'] @birth_date = u['birth_date'] @network_name = u['network_name'] end |
Instance Attribute Details
#birth_date ⇒ Object (readonly)
Returns the value of attribute birth_date.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def birth_date @birth_date end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def contact @contact end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def full_name @full_name end |
#full_user ⇒ Object (readonly)
Returns the value of attribute full_user.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def full_user @full_user end |
#hire_date ⇒ Object (readonly)
Returns the value of attribute hire_date.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def hire_date @hire_date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def id @id end |
#job_title ⇒ Object (readonly)
Returns the value of attribute job_title.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def job_title @job_title end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def location @location end |
#mugshot_url ⇒ Object (readonly)
Returns the value of attribute mugshot_url.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def mugshot_url @mugshot_url end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def name @name end |
#network_name ⇒ Object (readonly)
Returns the value of attribute network_name.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def network_name @network_name end |
#stats ⇒ Object (readonly)
Returns the value of attribute stats.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def stats @stats end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def url @url end |
#web_url ⇒ Object (readonly)
Returns the value of attribute web_url.
3 4 5 |
# File 'lib/yammer/user.rb', line 3 def web_url @web_url end |
Instance Method Details
#me? ⇒ Boolean
61 62 63 |
# File 'lib/yammer/user.rb', line 61 def me? @id == @client.me.id end |
#network_id ⇒ Object
26 27 28 29 |
# File 'lib/yammer/user.rb', line 26 def network_id get_full_user unless @network_id @network_id end |