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, 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

.dod_paygradeString

Produces a U.S. Department of Defense Paygrade.

Examples:

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

Returns:

  • (String)

Available since:

  • 1.9.0


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

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