Module: GamesRadar

Defined in:
lib/games_radar.rb,
lib/games_radar/game.rb,
lib/games_radar/genre.rb,
lib/games_radar/config.rb,
lib/games_radar/errors.rb,
lib/games_radar/result.rb,
lib/games_radar/version.rb,
lib/games_radar/request.rb,
lib/games_radar/platform.rb,
lib/games_radar/screenshot.rb

Defined Under Namespace

Modules: Request, Version Classes: Config, Game, GameNotFoundError, Genre, InvalidApiKeyError, Platform, Result, Screenshot, UnknownGenreError, UnknownPlatformError

Class Method Summary collapse

Class Method Details

.setup {|GamesRadar::Config| ... } ⇒ Object

Use this shortcut for GamesRadar::Config. Refer to the GamesRadar::Config for all available options.

Instead of setting values like

GamesRadar::Config.api_key = "SxKuVse22qqUcZXq"

You can write it as

GamesRadar.setup do |c|
  c.api_key = "SxKuVse22qqUcZXq"
end

Yields:


30
31
32
# File 'lib/games_radar.rb', line 30

def self.setup(&block)
  yield GamesRadar::Config
end