Sha256: 4264fdced1bb1a351e5fd2a5c9946962192917127ee00679b3174e3be60289e8

Contents?: true

Size: 433 Bytes

Versions: 1

Compression:

Stored size: 433 Bytes

Contents

module Faker
  class Company
    class << self
      def name
        Formats.at_rand.call
      end
    
      def suffix
        %w(Inc and\ Sons LLC Group).at_rand
      end
    end
    
    Formats = [
      Proc.new { [ Name.last_name, suffix ].join(' ') },
      Proc.new { [ Name.last_name, Name.last_name ].join('-') },
      Proc.new { "%s, %s and %s" % [ Name.last_name, Name.last_name, Name.last_name ] }
      ]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faker-0.1.0 lib/faker/company.rb