Module: Faker::CreditCard

Defined in:
lib/faker_credit_card.rb,
lib/faker_credit_card/visa.rb,
lib/faker_credit_card/version.rb,
lib/faker_credit_card/discover.rb,
lib/faker_credit_card/generator.rb,
lib/faker_credit_card/diners_club.rb,
lib/faker_credit_card/master_card.rb,
lib/faker_credit_card/american_express.rb

Defined Under Namespace

Modules: Generator Classes: AmericanExpress, DinersClub, Discover, MasterCard, Visa

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.number(type, options = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/faker_credit_card.rb', line 12

def self.number(type, options = {})
  case type
  when :american_express then AmericanExpress.number(options)
  when :diners_club      then DinersClub.number(options)
  when :discover         then Discover.number(options)
  when :master_card      then MasterCard.number(options)
  when :visa             then Visa.number(options)
  end
end