Class: Faker::Measurement
Constant Summary collapse
- ALL =
'all'
- NONE =
'none'
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.height(amount: rand(10)) ⇒ String
Produces a random height measurement.
-
.length(amount: rand(10)) ⇒ String
Produces a random length measurement.
-
.metric_height(amount: rand(10)) ⇒ String
Produces a random metric height measurement.
-
.metric_length(amount: rand(10)) ⇒ String
Produces a random metric length measurement.
-
.metric_volume(amount: rand(10)) ⇒ String
Produces a random metric volume measurement.
-
.metric_weight(amount: rand(10)) ⇒ String
Produces a random metric weight measurement.
-
.volume(amount: rand(10)) ⇒ String
Produces a random volume measurement.
-
.weight(amount: rand(10)) ⇒ String
Produces a random weight measurement.
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
.height(amount: rand(10)) ⇒ String
Produces a random height measurement.
22 23 24 |
# File 'lib/faker/default/measurement.rb', line 22 def height(amount: rand(10)) define_measurement_locale(amount, 'height') end |
.length(amount: rand(10)) ⇒ String
Produces a random length measurement.
37 38 39 |
# File 'lib/faker/default/measurement.rb', line 37 def length(amount: rand(10)) define_measurement_locale(amount, 'length') end |
.metric_height(amount: rand(10)) ⇒ String
Produces a random metric height measurement.
82 83 84 |
# File 'lib/faker/default/measurement.rb', line 82 def metric_height(amount: rand(10)) define_measurement_locale(amount, 'metric_height') end |
.metric_length(amount: rand(10)) ⇒ String
Produces a random metric length measurement.
97 98 99 |
# File 'lib/faker/default/measurement.rb', line 97 def metric_length(amount: rand(10)) define_measurement_locale(amount, 'metric_length') end |
.metric_volume(amount: rand(10)) ⇒ String
Produces a random metric volume measurement.
112 113 114 |
# File 'lib/faker/default/measurement.rb', line 112 def metric_volume(amount: rand(10)) define_measurement_locale(amount, 'metric_volume') end |
.metric_weight(amount: rand(10)) ⇒ String
Produces a random metric weight measurement.
127 128 129 |
# File 'lib/faker/default/measurement.rb', line 127 def metric_weight(amount: rand(10)) define_measurement_locale(amount, 'metric_weight') end |
.volume(amount: rand(10)) ⇒ String
Produces a random volume measurement.
52 53 54 |
# File 'lib/faker/default/measurement.rb', line 52 def volume(amount: rand(10)) define_measurement_locale(amount, 'volume') end |
.weight(amount: rand(10)) ⇒ String
Produces a random weight measurement.
67 68 69 |
# File 'lib/faker/default/measurement.rb', line 67 def weight(amount: rand(10)) define_measurement_locale(amount, 'weight') end |