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, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.heroString

Produces the name of a hero from Dota.

Examples:

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

Returns:

  • (String)

Available since:

  • 1.9.0


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

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:

  • (String)

Available since:

  • 1.9.0


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

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

.playerString

Produces the name of a professional Dota player.

Examples:

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

Returns:

  • (String)

Available since:

  • 1.9.0


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

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

.quote(legacy_hero = NOT_GIVEN, 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:

  • (String)

Available since:

  • 1.9.0


70
71
72
73
74
75
76
# File 'lib/faker/games/dota.rb', line 70

def quote(legacy_hero = NOT_GIVEN, hero: 'abaddon')
  warn_for_deprecated_arguments do |keywords|
    keywords << :hero if legacy_hero != NOT_GIVEN
  end

  fetch("games.dota.#{hero}.quote")
end

.teamString

Produces the name of a professional Dota team.

Examples:

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

Returns:

  • (String)

Available since:

  • 1.9.0


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

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