Class: User

Inherits:
Object
  • Object
show all
Defined in:
lib/api/utils/user.rb

Overview

This class is used to get the data from the User

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ User

Returns a new instance of User.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/api/utils/user.rb', line 7

def initialize(hash)
  data = hash['data']
  @puuid = data['puuid']
  @region = data['region']
  @name = data['name']
  @tag = data['tag']
  @account_level = data['account_level']
  @card = data['card']
  @last_update = data['last_update']
  @last_update_raw = data['last_update_raw']
end

Instance Attribute Details

#account_levelObject (readonly)

Returns the value of attribute account_level.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def 
  @account_level
end

#cardObject (readonly)

Returns the value of attribute card.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def card
  @card
end

#last_updateObject (readonly)

Returns the value of attribute last_update.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def last_update
  @last_update
end

#last_update_rawObject (readonly)

Returns the value of attribute last_update_raw.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def last_update_raw
  @last_update_raw
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def name
  @name
end

#puuidObject (readonly)

Returns the value of attribute puuid.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def puuid
  @puuid
end

#regionObject (readonly)

Returns the value of attribute region.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def region
  @region
end

#tagObject (readonly)

Returns the value of attribute tag.



5
6
7
# File 'lib/api/utils/user.rb', line 5

def tag
  @tag
end