Module: FFaker::Unit
Constant Summary
collapse
- TIME_UNITS =
[
{ name: 'Years', abbreviation: 'yr' },
{ name: 'Days', abbreviation: 'd' },
{ name: 'Hours', abbreviation: 'h' },
{ name: 'Minutes', abbreviation: 'm' },
{ name: 'Seconds', abbreviation: 's' },
{ name: 'Milliseconds', abbreviation: 'ms' }
].freeze
- TEMPERATURE_UNITS =
[
{ name: 'Kelvin', abbreviation: 'K' },
{ name: 'Celsius', abbreviation: 'C' },
{ name: 'Fahrenheit', abbreviation: 'F' }
].freeze
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#temperature_abbr ⇒ Object
34
35
36
|
# File 'lib/ffaker/unit.rb', line 34
def temperature_abbr
temperature[:abbreviation]
end
|
#temperature_name ⇒ Object
30
31
32
|
# File 'lib/ffaker/unit.rb', line 30
def temperature_name
temperature[:name]
end
|
#time_abbr ⇒ Object
26
27
28
|
# File 'lib/ffaker/unit.rb', line 26
def time_abbr
time[:abbreviation]
end
|
#time_name ⇒ Object
22
23
24
|
# File 'lib/ffaker/unit.rb', line 22
def time_name
time[:name]
end
|