lib/egn/parser.rb in egn-1.3.2 vs lib/egn/parser.rb in egn-1.3.3

- old
+ new

@@ -3,16 +3,15 @@ attr_reader :date, :sex # Parses the given EGN and returns all information that can be # extracted from it: date, sex and region def initialize(egn) - raise ArgumentError, "Invalid EGN" unless Validator.validate(egn) + raise ArgumentError, 'Invalid EGN' unless Validator.validate(egn) # Extract the correct date year, month, day = egn.scan(/.{1,2}/).map(&:to_i) year, month = Util.determine_date(year, month) @date = Date.new(year.to_i, month, day) end - end end