Class: User
- Inherits:
-
Object
- Object
- User
- Defined in:
- lib/api/utils/user.rb
Overview
This class is used to get the data from the User
Instance Attribute Summary collapse
-
#account_level ⇒ Object
readonly
Returns the value of attribute account_level.
-
#card ⇒ Object
readonly
Returns the value of attribute card.
-
#last_update ⇒ Object
readonly
Returns the value of attribute last_update.
-
#last_update_raw ⇒ Object
readonly
Returns the value of attribute last_update_raw.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#puuid ⇒ Object
readonly
Returns the value of attribute puuid.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(hash) ⇒ User
constructor
A new instance of User.
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_level ⇒ Object (readonly)
Returns the value of attribute account_level.
5 6 7 |
# File 'lib/api/utils/user.rb', line 5 def account_level @account_level end |
#card ⇒ Object (readonly)
Returns the value of attribute card.
5 6 7 |
# File 'lib/api/utils/user.rb', line 5 def card @card end |
#last_update ⇒ Object (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_raw ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/api/utils/user.rb', line 5 def name @name end |
#puuid ⇒ Object (readonly)
Returns the value of attribute puuid.
5 6 7 |
# File 'lib/api/utils/user.rb', line 5 def puuid @puuid end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
5 6 7 |
# File 'lib/api/utils/user.rb', line 5 def region @region end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
5 6 7 |
# File 'lib/api/utils/user.rb', line 5 def tag @tag end |