Method: Faker::Measurement.height

Defined in:
lib/faker/default/measurement.rb

.height(amount: rand(10)) ⇒ String

Produces a random height measurement.

Examples:

Faker::Measurement.height #=> "6 inches"
Faker::Measurement.height(amount: 1.4) #=> "1.4 inches"
Faker::Measurement.height(amount: "none") #=> "inch"
Faker::Measurement.height(amount: "all") #=> "inches"

Parameters:

  • amount (Integer) (defaults to: rand(10))

    Specifies the random height value.

Returns:

  • (String)

Available since:

  • 1.7.3



22
23
24
# File 'lib/faker/default/measurement.rb', line 22

def height(amount: rand(10))
  define_measurement_locale(amount, 'height')
end