1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
|
# frozen_string_literal: true
module Faker
class Space < Base
flexible :space
class << self
##
# Produces the name of a planet.
#
# @return [String]
#
# @example
# Faker::Space.planet #=> "Venus"
#
# @faker.version 1.6.4
def planet
fetch('space.planet')
end
##
# Produces the name of a moon.
#
# @return [String]
#
# @example
# Faker::Space.moon #=> "Europa"
#
# @faker.version 1.6.4
def moon
fetch('space.moon')
end
##
# Produces the name of a galaxy.
#
# @return [String]
#
# @example
# Faker::Space.galaxy #=> "Andromeda"
#
# @faker.version 1.6.4
def galaxy
fetch('space.galaxy')
end
##
# Produces the name of a nebula.
#
# @return [String]
#
# @example
# Faker::Space.nebula #=> "Triffid Nebula"
#
# @faker.version 1.6.4
def nebula
fetch('space.nebula')
end
##
# Produces the name of a star cluster.
#
# @return [String]
#
# @example
# Faker::Space.star_cluster #=> "Messier 70"
#
# @faker.version 1.6.4
def star_cluster
fetch('space.star_cluster')
end
##
# Produces the name of a constellation.
#
# @return [String]
#
# @example
# Faker::Space.constellation #=> "Orion"
#
# @faker.version 1.6.4
def constellation
fetch('space.constellation')
end
##
# Produces the name of a star.
#
# @return [String]
#
# @example
# Faker::Space.star #=> "Proxima Centauri"
#
# @faker.version 1.6.4
def star
fetch('space.star')
end
##
# Produces the name of a space agency.
#
# @return [String]
#
# @example
# Faker::Space.agency #=> "Japan Aerospace Exploration Agency"
#
# @faker.version 1.6.4
def agency
fetch('space.agency')
end
##
# Produces a space agency abbreviation.
#
# @return [String]
#
# @example
# Faker::Space.agency_abv #=> "NASA"
#
# @faker.version 1.6.4
def agency_abv
fetch('space.agency_abv')
end
##
# Produces the name of a NASA spacecraft.
#
# @return [String]
#
# @example
# Faker::Space.nasa_space_craft #=> "Endeavour"
#
# @faker.version 1.6.4
def nasa_space_craft
fetch('space.nasa_space_craft')
end
##
# Produces the name of a space company.
#
# @return [String]
#
# @example
# Faker::Space.company #=> "SpaceX"
#
# @faker.version 1.6.4
def company
fetch('space.company')
end
##
# Produces a distance measurement.
#
# @return [String]
#
# @example
# Faker::Space.distance_measurement #=> "15 parsecs"
#
# @faker.version 1.6.4
def distance_measurement
"#{rand(10..100)} #{fetch('space.distance_measurement')}"
end
##
# Produces the name of a meteorite.
#
# @return [String]
#
# @example
# Faker::Space.meteorite #=> "Ensisheim"
#
# @faker.version 1.7.0
def meteorite
fetch('space.meteorite')
end
##
# Produces the name of a launch vehicle.
#
# @return [String]
#
# @example
# Faker::Space.launch_vehicle #=> "Saturn IV"
#
# @faker.version 1.9.0
def launch_vehicle
fetch('space.launch_vehicle')
end
end
end
end
|