Class: RandomPerson::Names::BritishPrefix

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

Constant Summary collapse

Names =
%w(Mr Dr Mrs Ms Miss)

Instance Attribute Summary

Attributes inherited from RandomPerson::Name

#formats, #formats_ratiod, #names, #possibles

Instance Method Summary collapse

Methods included from Outputter

included

Constructor Details

#initializeBritishPrefix

Returns a new instance of BritishPrefix.



13
14
15
16
17
18
19
# File 'lib/randomperson/names/british-prefix.rb', line 13

def initialize
  @names = Names
  @formats_ratiod = [ 0..47, 48..49, 50..70, 71..87, 88..99]
  @possibles = Hash[ @formats_ratiod.zip @names ]

  @on_execute = for_prefixes( 'Miss', 'Mr' )
end