Class: Faker::Business

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/business.rb

Constant Summary

Constants inherited from Base

Faker::Base::Letters, Faker::Base::Numbers, Faker::Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, fetch, flexible, letterify, method_missing, numerify, parse, rand_in_range, regexify, translate

Class Method Details

.credit_card_expiry_dateObject



12
13
14
# File 'lib/faker/business.rb', line 12

def credit_card_expiry_date
  ::Date.today + (365 * (rand(4) + 1))
end

.credit_card_numberObject



8
9
10
# File 'lib/faker/business.rb', line 8

def credit_card_number
  fetch('business.credit_card_numbers')
end

.credit_card_typeObject



16
17
18
# File 'lib/faker/business.rb', line 16

def credit_card_type
  fetch('business.credit_card_types')
end