Class: Faker::Game

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/games/game.rb

Constant Summary

Constants inherited from Base

Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.genreString

Produces the name of a video game genre.

Examples:

Faker::Game.genre #=> "Real-time strategy"

Returns:



30
31
32
# File 'lib/faker/games/game.rb', line 30

def genre
  fetch('game.genre')
end

.platformString

Produces the name of a video game console or platform.

Examples:

Faker::Game.platform #=> "Nintendo Switch"

Returns:



43
44
45
# File 'lib/faker/games/game.rb', line 43

def platform
  fetch('game.platform')
end

.titleString

Produces the name of a video game.

Examples:

Faker::Game.title #=> "Half-Life 2"

Returns:



17
18
19
# File 'lib/faker/games/game.rb', line 17

def title
  fetch('game.title')
end