lib/faker/russian/okpo.rb in faker-russian-0.0.3 vs lib/faker/russian/okpo.rb in faker-russian-0.0.4

- old
+ new

@@ -1,11 +1,9 @@ module Faker module Russian module Okpo def okpo(options = {}) - if (options.keys - [:sequence_number]).any? - raise 'wrong options. just :sequence_number' - end + options.assert_valid_keys(:sequence_number) sequence = find_sequence(options[:sequence_number]) okpo_digits = okpo_region_numbers(sequence) okpo_digits + okpo_calc(okpo_digits) end