Class: Faker::Indian::Company
- Inherits:
-
Object
- Object
- Faker::Indian::Company
- Defined in:
- lib/faker/indian/company.rb
Constant Summary collapse
- PREFIXES =
data.fetch(:prefixes).freeze
- CORES =
data.fetch(:cores).freeze
- SUFFIXES =
data.fetch(:suffixes).freeze
- TYPES =
data.fetch(:types).freeze
Class Method Summary collapse
Class Method Details
.cin ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/faker/indian/company.rb', line 24 def cin state = Address::STATE_CODES.values.sample(random: random) year = random.rand(2000..2024) industry = format("%05d", random.rand(10_000..99_999)) serial = format("%06d", random.rand(100_000..999_999)) "U#{industry}#{state}#{year}PTC#{serial}" end |
.name ⇒ Object
16 17 18 |
# File 'lib/faker/indian/company.rb', line 16 def name "#{PREFIXES.sample(random: random)} #{CORES.sample(random: random)} #{SUFFIXES.sample(random: random)}" end |
.type ⇒ Object
20 21 22 |
# File 'lib/faker/indian/company.rb', line 20 def type TYPES.sample(random: random) end |