Class: NameGen::RandGenerator

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeRandGenerator

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