Class: Faker::Business
Constant Summary
Constants inherited from Base
Faker::Base::LLetters, Faker::Base::Letters, Faker::Base::NOT_GIVEN, Faker::Base::Numbers, Faker::Base::ULetters
Class Method Summary collapse
-
.credit_card_expiry_date ⇒ Date
Produces a credit card expiration date.
-
.credit_card_number ⇒ String
Produces a credit card number.
-
.credit_card_type ⇒ String
Produces a type of credit card.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale
Class Method Details
.credit_card_expiry_date ⇒ Date
Produces a credit card expiration date.
32 33 34 |
# File 'lib/faker/default/business.rb', line 32 def credit_card_expiry_date ::Date.today + (365 * rand(1..4)) end |
.credit_card_number ⇒ String
Produces a credit card number.
19 20 21 |
# File 'lib/faker/default/business.rb', line 19 def credit_card_number fetch('business.credit_card_numbers') end |
.credit_card_type ⇒ String
Produces a type of credit card.
45 46 47 |
# File 'lib/faker/default/business.rb', line 45 def credit_card_type fetch('business.credit_card_types') end |