Class: RandomPerson::Name
- Inherits:
-
Object
- Object
- RandomPerson::Name
- Includes:
- Outputter
- Defined in:
- lib/randomperson/name.rb
Overview
The base class for a name-data class.
Direct Known Subclasses
RandomPerson::Names::AmericanFemaleFirst, RandomPerson::Names::AmericanLast, RandomPerson::Names::AmericanMaleFirst, RandomPerson::Names::AmericanPrefix, RandomPerson::Names::AmericanSuffix, RandomPerson::Names::AncientGreekFemaleFirst, RandomPerson::Names::AncientGreekLast, RandomPerson::Names::AncientGreekMaleFirst, RandomPerson::Names::AnyLast, RandomPerson::Names::BasqueFemaleFirst, RandomPerson::Names::BasqueLast, RandomPerson::Names::BasqueMaleFirst, RandomPerson::Names::BritishPrefix, RandomPerson::Names::BritishSuffix, RandomPerson::Names::EnglishFemaleFirst, RandomPerson::Names::EnglishLast, RandomPerson::Names::EnglishMaleFirst, RandomPerson::Names::EnglishPrefix, RandomPerson::Names::FinnishFemaleFirst, RandomPerson::Names::FinnishLast, RandomPerson::Names::FinnishMaleFirst, RandomPerson::Names::FinnishPrefix, RandomPerson::Names::FrenchFemaleFirst, RandomPerson::Names::FrenchLast, RandomPerson::Names::FrenchMaleFirst, RandomPerson::Names::GermanFemaleFirst, RandomPerson::Names::GermanLast, RandomPerson::Names::GermanMaleFirst, RandomPerson::Names::ScottishFemaleFirst, RandomPerson::Names::ScottishLast, RandomPerson::Names::ScottishMaleFirst, RandomPerson::Names::ScottishPrefix, RandomPerson::Names::SpanishFemaleFirst, RandomPerson::Names::SpanishLast, RandomPerson::Names::SpanishMaleFirst, RandomPerson::Names::SpanishPrefix, RandomPerson::Names::SwedishFemaleFirst, RandomPerson::Names::SwedishLast, RandomPerson::Names::SwedishMaleFirst, RandomPerson::Names::ThaiFemaleFirst, RandomPerson::Names::ThaiFirst, RandomPerson::Names::ThaiLast, RandomPerson::Names::ThaiMaleFirst, RandomPerson::Names::ThaiRomanisedFemaleFirst, RandomPerson::Names::ThaiRomanisedLast, RandomPerson::Names::ThaiRomanisedMaleFirst, RandomPerson::Names::WelshFemaleFirst, RandomPerson::Names::WelshLast, RandomPerson::Names::WelshMaleFirst, RandomPerson::Names::WelshPrefix
Instance Attribute Summary collapse
-
#formats ⇒ Object
Returns the value of attribute formats.
-
#formats_ratiod ⇒ Object
Returns the value of attribute formats_ratiod.
-
#names ⇒ Object
Returns the value of attribute names.
-
#possibles ⇒ Object
Returns the value of attribute possibles.
Instance Method Summary collapse
-
#initialize ⇒ Name
constructor
A new instance of Name.
Methods included from Outputter
Constructor Details
#initialize ⇒ Name
Returns a new instance of Name.
14 15 16 17 18 19 20 |
# File 'lib/randomperson/name.rb', line 14 def initialize @possibles = Hash[ @formats_ratiod.zip @formats ] if @possibles.nil? unless @formats_ratiod.nil? @on_execute ||= for_standard @possibles end |
Instance Attribute Details
#formats ⇒ Object
Returns the value of attribute formats.
12 13 14 |
# File 'lib/randomperson/name.rb', line 12 def formats @formats end |
#formats_ratiod ⇒ Object
Returns the value of attribute formats_ratiod.
12 13 14 |
# File 'lib/randomperson/name.rb', line 12 def formats_ratiod @formats_ratiod end |
#names ⇒ Object
Returns the value of attribute names.
12 13 14 |
# File 'lib/randomperson/name.rb', line 12 def names @names end |
#possibles ⇒ Object
Returns the value of attribute possibles.
12 13 14 |
# File 'lib/randomperson/name.rb', line 12 def possibles @possibles end |