Class: Faker::Games::HalfLife

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/games/half_life.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

.characterString

Produces the name of a character from the Half-Life games.

Examples:

Faker::Games::HalfLife.character #=> "Gordon Freeman"

Returns:

  • (String)

Available since:

  • 1.9.2



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

def character
  fetch('games.half_life.character')
end

.enemyString

Produces the name of an enemy from the Half-Life games.

Examples:

Faker::Games::HalfLife.enemy #=> "Headcrab"

Returns:

  • (String)

Available since:

  • 1.9.2



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

def enemy
  fetch('games.half_life.enemy')
end

.locationString

Produces the name of a location from the Half-Life games.

Examples:

Faker::Games::HalfLife.location #=> "Black Mesa Research Facility"

Returns:

  • (String)

Available since:

  • 1.9.2



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

def location
  fetch('games.half_life.location')
end