Class: OmniAuth::AuthHash::InfoHash
- Defined in:
- lib/omniauth/auth_hash.rb
Class Method Summary collapse
Instance Method Summary collapse
- #name ⇒ Object
- #name? ⇒ Boolean (also: #valid?)
- #to_hash ⇒ Object
Methods inherited from KeyStore
Class Method Details
.subkey_class ⇒ Object
28 29 30 |
# File 'lib/omniauth/auth_hash.rb', line 28 def self.subkey_class Hashie::Mash end |
Instance Method Details
#name ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/omniauth/auth_hash.rb', line 32 def name return self[:name] if self[:name] return "#{first_name} #{last_name}".strip if first_name? || last_name? return nickname if nickname? return email if email? nil end |
#name? ⇒ Boolean Also known as: valid?
41 42 43 |
# File 'lib/omniauth/auth_hash.rb', line 41 def name? !!name end |
#to_hash ⇒ Object
46 47 48 49 50 |
# File 'lib/omniauth/auth_hash.rb', line 46 def to_hash hash = super hash['name'] ||= name hash end |