Class: NameGen::RandGenerator
- Inherits:
-
Object
- Object
- NameGen::RandGenerator
- Defined in:
- lib/name_gen/rand_generator.rb
Constant Summary collapse
- CONS =
%w(q w r t p s d f g h j k l z x c v b n m)
- VOWELS =
%w(e y u i o a)
- OPTIONS =
[:con1_vow1, :con1, :con1_vow2, :vow1]
Instance Method Summary collapse
- #get_name(elements) ⇒ Object
-
#initialize ⇒ RandGenerator
constructor
A new instance of RandGenerator.
Constructor Details
#initialize ⇒ RandGenerator
Returns a new instance of RandGenerator.
8 9 |
# File 'lib/name_gen/rand_generator.rb', line 8 def initialize end |
Instance Method Details
#get_name(elements) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/name_gen/rand_generator.rb', line 11 def get_name(elements) result_name = [] elements.times do result_name << get_syllable end result_name.join.capitalize end |