Class: MMRV1
- Inherits:
-
Object
- Object
- MMRV1
- Defined in:
- lib/api/utils/mmr_v1.rb
Overview
This class is used to get the @data from MMR
Instance Attribute Summary collapse
-
#currenttier ⇒ Object
readonly
Returns the value of attribute currenttier.
-
#currenttierpatched ⇒ Object
readonly
Returns the value of attribute currenttierpatched.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#elo ⇒ Object
readonly
Returns the value of attribute elo.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#mmr_change_to_last_game ⇒ Object
readonly
Returns the value of attribute mmr_change_to_last_game.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#old ⇒ Object
readonly
Returns the value of attribute old.
-
#ranking_in_tier ⇒ Object
readonly
Returns the value of attribute ranking_in_tier.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(hash) ⇒ MMRV1
constructor
A new instance of MMRV1.
Constructor Details
#initialize(hash) ⇒ MMRV1
Returns a new instance of MMRV1.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/api/utils/mmr_v1.rb', line 10 def initialize(hash) @data = hash['data'] @currenttier = @data['currenttier'] @currenttierpatched = @data['currenttierpatched'] @images = @data['images'] @ranking_in_tier = @data['ranking_in_tier'] @mmr_change_to_last_game = @data['mmr_change_to_last_game'] @elo = @data['elo'] @old = @data['old'] fetch_date end |
Instance Attribute Details
#currenttier ⇒ Object (readonly)
Returns the value of attribute currenttier.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def currenttier @currenttier end |
#currenttierpatched ⇒ Object (readonly)
Returns the value of attribute currenttierpatched.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def currenttierpatched @currenttierpatched end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def date @date end |
#elo ⇒ Object (readonly)
Returns the value of attribute elo.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def elo @elo end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def images @images end |
#mmr_change_to_last_game ⇒ Object (readonly)
Returns the value of attribute mmr_change_to_last_game.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def mmr_change_to_last_game @mmr_change_to_last_game end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def name @name end |
#old ⇒ Object (readonly)
Returns the value of attribute old.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def old @old end |
#ranking_in_tier ⇒ Object (readonly)
Returns the value of attribute ranking_in_tier.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def ranking_in_tier @ranking_in_tier end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
7 8 9 |
# File 'lib/api/utils/mmr_v1.rb', line 7 def tag @tag end |