Class: Faker::Compass

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

.abbreviationString

Produces a random abbreviation.

Examples:

Faker::Compass.abbreviation #=> "NEbN"

Returns:



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

def abbreviation
  parse('compass.abbreviation')
end

.azimuthString

Produces a random azimuth.

Examples:

Faker::Compass.azimuth #=> "168.75"

Returns:



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

def azimuth
  parse('compass.azimuth')
end

.cardinalString

Produces a random cardinal.

Examples:

Faker::Compass.cardinal #=> "north"

Returns:



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

def cardinal
  fetch('compass.cardinal.word')
end

.cardinal_abbreviationString

Produces a random cardinal abbreviation.

Examples:

Faker::Compass.cardinal_abbreviation #=> "N"

Returns:



106
107
108
# File 'lib/faker/default/compass.rb', line 106

def cardinal_abbreviation
  fetch('compass.cardinal.abbreviation')
end

.cardinal_azimuthString

Produces a random cardinal azimuth.

Examples:

Faker::Compass.cardinal_azimuth #=> "90"

Returns:



158
159
160
# File 'lib/faker/default/compass.rb', line 158

def cardinal_azimuth
  fetch('compass.cardinal.azimuth')
end

.directionString

Produces a random direction.

Examples:

Faker::Compass.direction #=> "southeast"

Returns:



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

def direction
  parse('compass.direction')
end

.half_windString

Produces a random half wind.

Examples:

Faker::Compass.half_wind #=> "north-northwest"

Returns:



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

def half_wind
  fetch('compass.half-wind.word')
end

.half_wind_abbreviationString

Produces a random half wind abbreviation.

Examples:

Faker::Compass.half_wind_abbreviation #=> "NNE"

Returns:



132
133
134
# File 'lib/faker/default/compass.rb', line 132

def half_wind_abbreviation
  fetch('compass.half-wind.abbreviation')
end

.half_wind_azimuthString

Produces a random half wind azimuth.

Examples:

Faker::Compass.half_wind_azimuth #=> "292.5"

Returns:



184
185
186
# File 'lib/faker/default/compass.rb', line 184

def half_wind_azimuth
  fetch('compass.half-wind.azimuth')
end

.ordinalString

Produces a random ordinal.

Examples:

Faker::Compass.ordinal #=> "northwest"

Returns:



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

def ordinal
  fetch('compass.ordinal.word')
end

.ordinal_abbreviationString

Produces a random ordinal abbreviation.

Examples:

Faker::Compass.ordinal_abbreviation #=> "SW"

Returns:



119
120
121
# File 'lib/faker/default/compass.rb', line 119

def ordinal_abbreviation
  fetch('compass.ordinal.abbreviation')
end

.ordinal_azimuthString

Produces a random ordinal azimuth.

Examples:

Faker::Compass.ordinal_azimuth #=> "135"

Returns:



171
172
173
# File 'lib/faker/default/compass.rb', line 171

def ordinal_azimuth
  fetch('compass.ordinal.azimuth')
end

.quarter_windString

Produces a random quarter wind.

Examples:

Faker::Compass.quarter_wind #=> "north by west"

Returns:



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

def quarter_wind
  fetch('compass.quarter-wind.word')
end

.quarter_wind_abbreviationString

Produces a random quarter wind abbreviation.

Examples:

Faker::Compass.quarter_wind_abbreviation #=> "SWbS"

Returns:



145
146
147
# File 'lib/faker/default/compass.rb', line 145

def quarter_wind_abbreviation
  fetch('compass.quarter-wind.abbreviation')
end

.quarter_wind_azimuthString

Produces a random quarter wind azimuth

Examples:

Faker::Compass.quarter_wind_azimuth #=> "56.25"

Returns:



197
198
199
# File 'lib/faker/default/compass.rb', line 197

def quarter_wind_azimuth
  fetch('compass.quarter-wind.azimuth')
end