Class: Synthra::Types::TechnologyInternet::Language
- Defined in:
- lib/synthra/types/technology_internet/formats.rb
Overview
Language type
Constant Summary collapse
- LANGUAGES =
[ "English", "Spanish", "French", "German", "Italian", "Portuguese", "Russian", "Chinese", "Japanese", "Korean", "Arabic", "Hindi" ].freeze
Instance Method Summary collapse
- #generate_edge(rng, context, args) ⇒ Object
- #generate_invalid(rng, context, args) ⇒ Object
- #generate_random(rng, context, args) ⇒ Object
Instance Method Details
#generate_edge(rng, context, args) ⇒ Object
17 18 19 |
# File 'lib/synthra/types/technology_internet/formats.rb', line 17 def generate_edge(rng, context, args) ["", "English", "A"].sample(random: rng.instance_variable_get(:@random)) end |
#generate_invalid(rng, context, args) ⇒ Object
21 22 23 |
# File 'lib/synthra/types/technology_internet/formats.rb', line 21 def generate_invalid(rng, context, args) [nil, 123, [], {}].sample(random: rng.instance_variable_get(:@random)) end |
#generate_random(rng, context, args) ⇒ Object
13 14 15 |
# File 'lib/synthra/types/technology_internet/formats.rb', line 13 def generate_random(rng, context, args) rng.sample(LANGUAGES) end |