Class: Faker::Games::Dota

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/games/dota.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, shuffle!, translate, unique, with_locale

Class Method Details

.buildingString

Produces the name of a building from Dota.

Examples:

Faker::Games::Dota.building #=> "Tower"

Returns:



16
17
18
# File 'lib/faker/games/dota.rb', line 16

def building
  fetch('games.dota.building')
end

.heroString

Produces the name of a hero from Dota.

Examples:

Faker::Games::Dota.hero #=> "Abaddon"

Returns:



29
30
31
# File 'lib/faker/games/dota.rb', line 29

def hero
  fetch('games.dota.hero')
end

.itemString

Produces the name of an item from Dota.

Examples:

Faker::Games::Dota.item #=> "Armlet of Mordiggian"

Returns:



42
43
44
# File 'lib/faker/games/dota.rb', line 42

def item
  fetch('games.dota.item')
end

.playerString

Produces the name of a professional Dota player.

Examples:

Faker::Games::Dota.player #=> "Dendi"

Returns:



68
69
70
# File 'lib/faker/games/dota.rb', line 68

def player
  fetch('games.dota.player')
end

.quote(hero: 'abaddon') ⇒ String

Produces the name of a hero from Dota.

Examples:

Faker::Games::Dota.quote #=> "You have called death upon yourself."
Faker::Games::Dota.quote(hero: 'alchemist') #=> "Better living through alchemy!"

Parameters:

  • hero (String) (defaults to: 'abaddon')

    The name of a Dota hero.

Returns:



83
84
85
# File 'lib/faker/games/dota.rb', line 83

def quote(hero: 'abaddon')
  fetch("games.dota.#{hero}.quote")
end

.teamString

Produces the name of a professional Dota team.

Examples:

Faker::Games::Dota.team #=> "Evil Geniuses"

Returns:



55
56
57
# File 'lib/faker/games/dota.rb', line 55

def team
  fetch('games.dota.team')
end