Class: MMRV1

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

Overview

This class is used to get the @data from MMR

Instance Attribute Summary collapse

Instance Method Summary collapse

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
  fetch_nametag
end

Instance Attribute Details

#currenttierObject (readonly)

Returns the value of attribute currenttier.



7
8
9
# File 'lib/api/utils/mmr_v1.rb', line 7

def currenttier
  @currenttier
end

#currenttierpatchedObject (readonly)

Returns the value of attribute currenttierpatched.



7
8
9
# File 'lib/api/utils/mmr_v1.rb', line 7

def currenttierpatched
  @currenttierpatched
end

#dateObject (readonly)

Returns the value of attribute date.



7
8
9
# File 'lib/api/utils/mmr_v1.rb', line 7

def date
  @date
end

#eloObject (readonly)

Returns the value of attribute elo.



7
8
9
# File 'lib/api/utils/mmr_v1.rb', line 7

def elo
  @elo
end

#imagesObject (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_gameObject (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

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/api/utils/mmr_v1.rb', line 7

def name
  @name
end

#oldObject (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_tierObject (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

#tagObject (readonly)

Returns the value of attribute tag.



7
8
9
# File 'lib/api/utils/mmr_v1.rb', line 7

def tag
  @tag
end