Class: VSTS::Identity
Overview
User (person) model
Instance Attribute Summary collapse
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#unique_name ⇒ Object
Returns the value of attribute unique_name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(identity_hash = {}) ⇒ Identity
constructor
Create Identity from allowed hash values.
Methods inherited from BaseModel
Constructor Details
#initialize(identity_hash = {}) ⇒ Identity
Create Identity from allowed hash values
8 9 10 11 12 13 14 |
# File 'lib/vsts/identity.rb', line 8 def initialize(identity_hash = {}) identity_hash.select! { |k, _v| ["id", "displayName", "uniqueName", "url", "imageUrl"].include?(k) } identity_hash.each do |k, v| usk = underscore(k) public_send("#{usk}=", v) end end |
Instance Attribute Details
#display_name ⇒ Object
Returns the value of attribute display_name.
5 6 7 |
# File 'lib/vsts/identity.rb', line 5 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/vsts/identity.rb', line 5 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url.
5 6 7 |
# File 'lib/vsts/identity.rb', line 5 def image_url @image_url end |
#unique_name ⇒ Object
Returns the value of attribute unique_name.
5 6 7 |
# File 'lib/vsts/identity.rb', line 5 def unique_name @unique_name end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/vsts/identity.rb', line 5 def url @url end |