Class: Sightstone
- Inherits:
-
Object
- Object
- Sightstone
- Defined in:
- lib/sightstone.rb
Overview
This is the main class of the Sightstone gem. All calls should be perfomrmed through this class.
Instance Attribute Summary (collapse)
-
- (String) api_key
Your api key.
-
- (Object) champion
Returns the value of attribute champion.
-
- (ChampionModule) Champion
module to call the champion api.
-
- (Object) game
Returns the value of attribute game.
-
- (GameModule) Game
module to call the game api.
-
- (LeagueModule) League
module to call the leagues api.
-
- (Object) league
Returns the value of attribute league.
-
- (String) region
The default region.
-
- (Object) stats
Returns the value of attribute stats.
-
- (StatsModule) Stats
module to call the stats api.
-
- (SummonerModule) summoner
Module to call the summoners api.
-
- (TeamModule) Team
module to call the team api.
-
- (Object) team
Returns the value of attribute team.
Instance Method Summary (collapse)
-
- (Sightstone) initialize(api_key, region = 'euw')
constructor
A new instance of Sightstone.
Constructor Details
- (Sightstone) initialize(api_key, region = 'euw')
Returns a new instance of Sightstone
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/sightstone.rb', line 27 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) end |
Instance Attribute Details
- (String) api_key
Your api key
19 20 21 |
# File 'lib/sightstone.rb', line 19 def api_key @api_key end |
- (Object) champion
Returns the value of attribute champion
23 24 25 |
# File 'lib/sightstone.rb', line 23 def champion @champion end |
- (ChampionModule) Champion
module to call the champion api
19 20 21 |
# File 'lib/sightstone.rb', line 19 def Champion @Champion end |
- (Object) game
Returns the value of attribute game
23 24 25 |
# File 'lib/sightstone.rb', line 23 def game @game end |
- (GameModule) Game
module to call the game api
19 20 21 |
# File 'lib/sightstone.rb', line 19 def Game @Game end |
- (LeagueModule) League
module to call the leagues api
19 20 21 |
# File 'lib/sightstone.rb', line 19 def League @League end |
- (Object) league
Returns the value of attribute league
23 24 25 |
# File 'lib/sightstone.rb', line 23 def league @league end |
- (String) region
The default region
19 20 21 |
# File 'lib/sightstone.rb', line 19 def region @region end |
- (Object) stats
Returns the value of attribute stats
23 24 25 |
# File 'lib/sightstone.rb', line 23 def stats @stats end |
- (StatsModule) Stats
module to call the stats api
19 20 21 |
# File 'lib/sightstone.rb', line 19 def Stats @Stats end |
- (SummonerModule) summoner
Module to call the summoners api
19 20 21 |
# File 'lib/sightstone.rb', line 19 def summoner @summoner end |
- (TeamModule) Team
module to call the team api
19 20 21 |
# File 'lib/sightstone.rb', line 19 def Team @Team end |
- (Object) team
Returns the value of attribute team
23 24 25 |
# File 'lib/sightstone.rb', line 23 def team @team end |