Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/namna/string.rb

Constant Summary collapse

ALPHABET =
('a'..'z').to_a
VOWELS =
%w(a e i o u)
CONSONANTS =
ALPHABET - VOWELS

Instance Method Summary collapse

Instance Method Details

#namna_subObject



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/namna/string.rb', line 6

def namna_sub
  case self
  when '?'
    ALPHABET.sample
  when '*'
    VOWELS.sample
  when '#'
    CONSONANTS.sample
  else
    self
  end
end