Class: Faker::Military

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

.air_force_rankString

Produces a rank in the U.S. Air Force.

Examples:

Faker::Military.air_force_rank #=> "Captain"

Returns:

  • (String)

Available since:

  • 1.9.0



54
55
56
# File 'lib/faker/default/military.rb', line 54

def air_force_rank
  fetch('military.air_force_rank')
end

.army_rankString

Produces a rank in the U.S. Army.

Examples:

Faker::Military.army_rank #=> "Staff Sergeant"

Returns:

  • (String)

Available since:

  • 1.9.0



15
16
17
# File 'lib/faker/default/military.rb', line 15

def army_rank
  fetch('military.army_rank')
end

.coast_guard_rankString

Produces a rank in the U.S. Coast Guard

Examples:

Faker::Military.coast_guard_rank #=> "Master Chief Petty Officer of the Coast Guard"

Returns:

  • (String)

Available since:

  • next



80
81
82
# File 'lib/faker/default/military.rb', line 80

def coast_guard_rank
  fetch('military.coast_guard_rank')
end

.dod_paygradeString

Produces a U.S. Department of Defense Paygrade.

Examples:

Faker::Military.dod_paygrade #=> "E-6"

Returns:

  • (String)

Available since:

  • 1.9.0



93
94
95
# File 'lib/faker/default/military.rb', line 93

def dod_paygrade
  fetch('military.dod_paygrade')
end

.marines_rankString

Produces a rank in the U.S. Marines.

Examples:

Faker::Military.marines_rank #=> "Gunnery Sergeant"

Returns:

  • (String)

Available since:

  • 1.9.0



28
29
30
# File 'lib/faker/default/military.rb', line 28

def marines_rank
  fetch('military.marines_rank')
end

Produces a rank in the U.S. Navy.

Examples:

Faker::Military.navy_rank #=> "Seaman"

Returns:

  • (String)

Available since:

  • 1.9.0



41
42
43
# File 'lib/faker/default/military.rb', line 41

def navy_rank
  fetch('military.navy_rank')
end

.space_force_rankString

Produces a rank in the U.S. Space Force.

Examples:

Faker::Military.space_force_rank #=> "Senior Enlisted Advisor of the Space Force"

Returns:

  • (String)

Available since:

  • next



67
68
69
# File 'lib/faker/default/military.rb', line 67

def space_force_rank
  fetch('military.space_force_rank')
end