Class: RandomPerson::Names::SpanishPrefix

Inherits:
RandomPerson::Name show all
Defined in:
lib/randomperson/names/spanish-prefix.rb

Constant Summary collapse

Names =
["Sr.", "Dr.", "Dra.", "Sra.", "Srta."]

Instance Attribute Summary

Attributes inherited from RandomPerson::Name

#formats, #formats_ratiod, #names, #possibles

Instance Method Summary collapse

Methods included from Outputter

included

Constructor Details

#initializeSpanishPrefix

the way this class is set up is different than usual it’s all just a shortcut, but it works



15
16
17
18
19
20
21
22
23
# File 'lib/randomperson/names/spanish-prefix.rb', line 15

def initialize
  @names = Names
  @formats_ratiod = [ 0..48, 49..49, 50..50, 51..74, 75..99]
  @possibles = Hash[ @formats_ratiod.zip @names ]

  @on_execute = for_prefixes( @names.last, @names.first )
  
  super
end