Class: Stats
- Inherits:
-
Object
- Object
- Stats
- Defined in:
- lib/LoLStat/Stats.rb
Instance Attribute Summary collapse
-
#datas ⇒ Object
readonly
Returns the value of attribute datas.
Instance Method Summary collapse
-
#initialize(summonerId, api_key) ⇒ Stats
constructor
A new instance of Stats.
Constructor Details
#initialize(summonerId, api_key) ⇒ Stats
Returns a new instance of Stats.
3 4 5 6 |
# File 'lib/LoLStat/Stats.rb', line 3 def initialize(summonerId, api_key) @URI = "https://prod.api.pvp.net/api/lol/na/v1.1/stats/by-summoner/" + summonerId.to_s + "/summary" + "?api_key=" + api_key.to_s @data = JSON.parse(Net::HTTP.get_response(URI.parse(@URI)).body) end |
Instance Attribute Details
#datas ⇒ Object (readonly)
Returns the value of attribute datas.
2 3 4 |
# File 'lib/LoLStat/Stats.rb', line 2 def datas @datas end |