Sha256: 801158d676ece465a7cceb023c1d63cb2cd57b570fd61f4027dd75b04ecabbdc

Contents?: true

Size: 886 Bytes

Versions: 2

Compression:

Stored size: 886 Bytes

Contents

class Forgery::Name < Forgery

  def self.last_name
    dictionaries[:last_names].random
  end

  def self.first_name
    [dictionaries[:male_first_names], dictionaries[:female_first_names]].random.random
  end

  def self.full_name
    "#{self.first_name} #{self.last_name}"
  end

  def self.male_first_name
    dictionaries[:male_first_names].random
  end

  def self.female_first_name
    dictionaries[:female_first_names].random
  end

  def self.company_name
    dictionaries[:company_names].random
  end

  def self.job_title
    dictionaries[:job_titles].random.sub('#{N}', self.job_title_suffix)
  end

  def self.job_title_suffix
    dictionaries[:job_title_suffixes].random
  end

  def self.title
    dictionaries[:name_titles].random
  end

  def self.suffix
    dictionaries[:name_suffixes].random
  end

  def self.location
    dictionaries[:locations].random
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgery-0.3.7 lib/forgery/forgery/name.rb
forgery-0.3.6 lib/forgery/forgery/name.rb