Sha256: 73d11ec1900df2f704fc8f700d2a6e2f12ba7f97df77caf1262226d4fb8ddb40

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

class Forgery::Name < Forgery

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

  def self.first_name
    Forgery::Extend(dictionaries[:male_first_names] + dictionaries[:female_first_names]).random.unextend
  end

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

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

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

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

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

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

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

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

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

  def self.industry
    dictionaries[:industries].random.unextend
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
forgery-0.8.1 lib/forgery/forgery/name.rb
forgery-0.7.0 lib/forgery/forgery/name.rb
forgery-0.6.0 lib/forgery/forgery/name.rb
forgery-0.5.0 lib/forgery/forgery/name.rb
forgery-0.4.4 lib/forgery/forgery/name.rb
forgery-0.4.3 lib/forgery/forgery/name.rb
forgery-0.4.2 lib/forgery/forgery/name.rb
forgery-0.4.1 lib/forgery/forgery/name.rb