Class: Synthra::Types::TechnologyInternet::MobileDeviceOs

Inherits:
Base
  • Object
show all
Defined in:
lib/synthra/types/technology_internet/devices.rb

Overview

MobileDeviceOs type

Constant Summary collapse

OS_TYPES =
["iOS", "Android", "Windows Mobile", "BlackBerry OS"].freeze

Instance Method Summary collapse

Instance Method Details

#generate_edge(rng, context, args) ⇒ Object



51
52
53
# File 'lib/synthra/types/technology_internet/devices.rb', line 51

def generate_edge(rng, context, args)
  ["", "iOS", "Android"].sample(random: rng.instance_variable_get(:@random))
end

#generate_invalid(rng, context, args) ⇒ Object



55
56
57
# File 'lib/synthra/types/technology_internet/devices.rb', line 55

def generate_invalid(rng, context, args)
  [nil, 123, [], {}].sample(random: rng.instance_variable_get(:@random))
end

#generate_random(rng, context, args) ⇒ Object



47
48
49
# File 'lib/synthra/types/technology_internet/devices.rb', line 47

def generate_random(rng, context, args)
  rng.sample(OS_TYPES)
end