Class: Faker::Device

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

Constant Summary

Constants inherited from Base

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

Class Method Summary collapse

Methods inherited from Base

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

Class Method Details

.build_numberObject


6
7
8
# File 'lib/faker/default/device.rb', line 6

def build_number
  Faker::Number.between(1, 500)
end

.manufacturerObject


10
11
12
# File 'lib/faker/default/device.rb', line 10

def manufacturer
  fetch('device.manufacturer')
end

.model_nameObject


14
15
16
# File 'lib/faker/default/device.rb', line 14

def model_name
  fetch('device.model_name')
end

.platformObject


18
19
20
# File 'lib/faker/default/device.rb', line 18

def platform
  fetch('device.platform')
end

.serialObject


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

def serial
  fetch('device.serial')
end

.versionObject


26
27
28
# File 'lib/faker/default/device.rb', line 26

def version
  Faker::Number.between(1, 1000)
end