Class: Sightstone::Sightstone

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, region = 'euw') ⇒ Sightstone

Returns a new instance of Sightstone.

Parameters:

  • api_key (String)

    Riot developer api key

  • region (String) (defaults to: 'euw')

    The default region to be used. See riots dev. page for supported regions.



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/sightstone.rb', line 30

def initialize(api_key, region='euw')
  @api_key = api_key
  @region = region
  
  @summoner = SummonerModule.new(self)
  @champion = ChampionModule.new(self)
  @game = GameModule.new(self)
  @league = LeagueModule.new(self)
  @stats = StatsModule.new(self)
  @team = TeamModule.new(self)
  @ddragon = DatadragonModule.new(self)
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



25
26
27
# File 'lib/sightstone.rb', line 25

def api_key
  @api_key
end

#championObject

Returns the value of attribute champion.



26
27
28
# File 'lib/sightstone.rb', line 26

def champion
  @champion
end

#ddragonObject

Returns the value of attribute ddragon.



26
27
28
# File 'lib/sightstone.rb', line 26

def ddragon
  @ddragon
end

#gameObject

Returns the value of attribute game.



26
27
28
# File 'lib/sightstone.rb', line 26

def game
  @game
end

#leagueObject

Returns the value of attribute league.



26
27
28
# File 'lib/sightstone.rb', line 26

def league
  @league
end

#regionObject

Returns the value of attribute region.



24
25
26
# File 'lib/sightstone.rb', line 24

def region
  @region
end

#statsObject

Returns the value of attribute stats.



26
27
28
# File 'lib/sightstone.rb', line 26

def stats
  @stats
end

#summonerObject

Returns the value of attribute summoner.



26
27
28
# File 'lib/sightstone.rb', line 26

def summoner
  @summoner
end

#teamObject

Returns the value of attribute team.



26
27
28
# File 'lib/sightstone.rb', line 26

def team
  @team
end