lib/faker/russian/kpp.rb in faker-russian-0.0.3 vs lib/faker/russian/kpp.rb in faker-russian-0.0.4
- old
+ new
@@ -1,11 +1,9 @@
module Faker
module Russian
module Kpp
def kpp(options = {})
- if (options.keys - [:sequence_number, :region_number]).any?
- raise 'wrong options. just :region_number or :sequence_number'
- end
+ options.assert_valid_keys(:sequence_number, :region_number)
sequence = find_sequence(options[:sequence_number])
region_number = find_region_number(options[:region_number], sequence)
region_number + two_region_numbers(sequence) + '01001'