Class: HubIdentityRuby::CurrentUser

Inherits:
Object
  • Object
show all
Defined in:
app/models/hub_identity_ruby/current_user.rb

Instance Method Summary collapse

Constructor Details

#initialize(json_params) ⇒ CurrentUser

Returns a new instance of CurrentUser.



4
5
6
7
8
9
10
11
# File 'app/models/hub_identity_ruby/current_user.rb', line 4

def initialize(json_params)
  user_params = parse(json_params)
  @email = user_params["email"]
  @owner_type = user_params["owner_type"]
  @owner_uid = user_params["owner_uid"]
  @user_type = user_params["user_type"]
  @uid = user_params["uid"]
end

Instance Method Details

#hashObject



13
14
15
# File 'app/models/hub_identity_ruby/current_user.rb', line 13

def hash
  hash_values if valid?
end