lib/fantasy_faker/character.rb in fantasy_faker-0.0.2 vs lib/fantasy_faker/character.rb in fantasy_faker-0.0.3
- old
+ new
@@ -4,31 +4,35 @@
module Character
extend BaseModule
extend self
- def male_name
+ def male_first_name
"%s%s" % [NAME_PREFIXES_MALE.rand, NAME_SUFIXES_MALE.rand]
end
def male_nickname
NICKNAMES_MALE.rand
end
- def male_full_name
- "%s %s" % [male_name, male_nickname]
+ def male_name
+ first_name = male_first_name
+
+ ["#{first_name} #{male_nickname}", first_name].sample
end
- def female_name
+ def female_first_name
"%s%s" % [NAME_PREFIXES_FEMALE.rand, NAME_SUFIXES_FEMALE.rand]
end
def female_nickname
NICKNAMES_FEMALE.rand
end
- def female_full_name
- "%s %s" % [female_name, female_nickname]
+ def female_name
+ first_name = female_first_name
+
+ ["#{first_name} #{female_nickname}", first_name].sample
end
end
end