Sha256: 93f0b4f5ddc2af4e4a66a287075d8ea362c9c08d51df8f4b37f893000c34a250

Contents?: true

Size: 900 Bytes

Versions: 4

Compression:

Stored size: 900 Bytes

Contents

require 'credit_card_validations/version'
require 'active_model'
require 'active_support/core_ext'
require 'active_model/validations'
require 'active_model/credit_card_number_validator'

module CreditCardValidations
   extend ActiveSupport::Autoload
   autoload :VERSION, 'credit_card_validations/version'
   autoload :Luhn, 'credit_card_validations/luhn'
   autoload :CardRules , 'credit_card_validations/card_rules'
   autoload :Detector , 'credit_card_validations/detector'
   autoload :Mmi, 'credit_card_validations/mmi'
end  


CreditCardValidations::CardRules.rules.each do |name, rules|
   rules.each do |rule_value|
     CreditCardValidations::Detector.add_rule(name,
                                              rule_value[:length],
                                              rule_value[:prefixes],
                                              rule_value[:skip_validation])
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
credit_card_validations-1.4.7 lib/credit_card_validations.rb
credit_card_validations-1.4.6 lib/credit_card_validations.rb
credit_card_validations-1.4.5 lib/credit_card_validations.rb
credit_card_validations-1.4.4 lib/credit_card_validations.rb