Class: Faker::Space

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

.agencyString

Produces the name of a space agency.

Examples:

Faker::Space.agency #=> "Japan Aerospace Exploration Agency"

Returns:

  • (String)

Available since:

  • 1.6.4


108
109
110
# File 'lib/faker/default/space.rb', line 108

def agency
  fetch('space.agency')
end

.agency_abvString

Produces a space agency abbreviation.

Examples:

Faker::Space.agency_abv #=> "NASA"

Returns:

  • (String)

Available since:

  • 1.6.4


121
122
123
# File 'lib/faker/default/space.rb', line 121

def agency_abv
  fetch('space.agency_abv')
end

.companyString

Produces the name of a space company.

Examples:

Faker::Space.company #=> "SpaceX"

Returns:

  • (String)

Available since:

  • 1.6.4


147
148
149
# File 'lib/faker/default/space.rb', line 147

def company
  fetch('space.company')
end

.constellationString

Produces the name of a constellation.

Examples:

Faker::Space.constellation #=> "Orion"

Returns:

  • (String)

Available since:

  • 1.6.4


82
83
84
# File 'lib/faker/default/space.rb', line 82

def constellation
  fetch('space.constellation')
end

.distance_measurementString

Produces a distance measurement.

Examples:

Faker::Space.distance_measurement #=> "15 parsecs"

Returns:

  • (String)

Available since:

  • 1.6.4


160
161
162
# File 'lib/faker/default/space.rb', line 160

def distance_measurement
  rand(10..100).to_s + ' ' + fetch('space.distance_measurement')
end

.galaxyString

Produces the name of a galaxy.

Examples:

Faker::Space.galaxy #=> "Andromeda"

Returns:

  • (String)

Available since:

  • 1.6.4


43
44
45
# File 'lib/faker/default/space.rb', line 43

def galaxy
  fetch('space.galaxy')
end

.launch_vehicleString

Produces the name of a launch vehicle.

Examples:

Faker::Space.launch_vehicle #=> "Saturn IV"

Returns:

  • (String)

Available since:

  • 1.9.0


186
187
188
# File 'lib/faker/default/space.rb', line 186

def launch_vehicle
  fetch('space.launch_vehicle')
end

.meteoriteString

Produces the name of a meteorite.

Examples:

Faker::Space.meteorite #=> "Ensisheim"

Returns:

  • (String)

Available since:

  • 1.7.0


173
174
175
# File 'lib/faker/default/space.rb', line 173

def meteorite
  fetch('space.meteorite')
end

.moonString

Produces the name of a moon.

Examples:

Faker::Space.moon #=> "Europa"

Returns:

  • (String)

Available since:

  • 1.6.4


30
31
32
# File 'lib/faker/default/space.rb', line 30

def moon
  fetch('space.moon')
end

.nasa_space_craftString

Produces the name of a NASA spacecraft.

Examples:

Faker::Space.nasa_space_craft #=> "Endeavour"

Returns:

  • (String)

Available since:

  • 1.6.4


134
135
136
# File 'lib/faker/default/space.rb', line 134

def nasa_space_craft
  fetch('space.nasa_space_craft')
end

.nebulaString

Produces the name of a nebula.

Examples:

Faker::Space.nebula #=> "Triffid Nebula"

Returns:

  • (String)

Available since:

  • 1.6.4


56
57
58
# File 'lib/faker/default/space.rb', line 56

def nebula
  fetch('space.nebula')
end

.planetString

Produces the name of a planet.

Examples:

Faker::Space.planet #=> "Venus"

Returns:

  • (String)

Available since:

  • 1.6.4


17
18
19
# File 'lib/faker/default/space.rb', line 17

def planet
  fetch('space.planet')
end

.starString

Produces the name of a star.

Examples:

Faker::Space.star #=> "Proxima Centauri"

Returns:

  • (String)

Available since:

  • 1.6.4


95
96
97
# File 'lib/faker/default/space.rb', line 95

def star
  fetch('space.star')
end

.star_clusterString

Produces the name of a star cluster.

Examples:

Faker::Space.star_cluster #=> "Messier 70"

Returns:

  • (String)

Available since:

  • 1.6.4


69
70
71
# File 'lib/faker/default/space.rb', line 69

def star_cluster
  fetch('space.star_cluster')
end