Class: Faker::Measurement

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/measurement.rb

Constant Summary collapse

ALL =
'all'.freeze
NONE =
'none'.freeze

Constants inherited from Base

Base::Letters, Base::Numbers, Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.height(amount = rand(10)) ⇒ Object



7
8
9
# File 'lib/faker/measurement.rb', line 7

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

.length(amount = rand(10)) ⇒ Object



11
12
13
# File 'lib/faker/measurement.rb', line 11

def length(amount = rand(10))
  define_measurement_locale(amount, 'length')
end

.metric_height(amount = rand(10)) ⇒ Object



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

def metric_height(amount = rand(10))
  define_measurement_locale(amount, 'metric_height')
end

.metric_length(amount = rand(10)) ⇒ Object



27
28
29
# File 'lib/faker/measurement.rb', line 27

def metric_length(amount = rand(10))
  define_measurement_locale(amount, 'metric_length')
end

.metric_volume(amount = rand(10)) ⇒ Object



31
32
33
# File 'lib/faker/measurement.rb', line 31

def metric_volume(amount = rand(10))
  define_measurement_locale(amount, 'metric_volume')
end

.metric_weight(amount = rand(10)) ⇒ Object



35
36
37
# File 'lib/faker/measurement.rb', line 35

def metric_weight(amount = rand(10))
  define_measurement_locale(amount, 'metric_weight')
end

.volume(amount = rand(10)) ⇒ Object



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

def volume(amount = rand(10))
  define_measurement_locale(amount, 'volume')
end

.weight(amount = rand(10)) ⇒ Object



19
20
21
# File 'lib/faker/measurement.rb', line 19

def weight(amount = rand(10))
  define_measurement_locale(amount, 'weight')
end