Class: Tsclient::Profile
- Inherits:
-
Object
- Object
- Tsclient::Profile
- Defined in:
- lib/tsclient/profile.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from(data) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/tsclient/profile.rb', line 5 def self.from(data) with( identifier: data.dig("UserProfile", "LoginName"), name: data.dig("UserProfile", "DisplayName"), profile_pic_url: data.dig("UserProfile", "ProfilePicURL"), # We assume anyone with an email address as their SSO identifier is human human: data.dig("UserProfile", "LoginName").include?("@") ) end |
Instance Method Details
#human? ⇒ Boolean
15 16 17 |
# File 'lib/tsclient/profile.rb', line 15 def human? human end |