lib/healthcare_phony/identifier.rb in healthcare_phony-0.4.1 vs lib/healthcare_phony/identifier.rb in healthcare_phony-0.5.0

- old
+ new

@@ -10,10 +10,10 @@ # Public: Initializes an Address. Pass in hash of different parameters, currently this includes: # type_code - Identifier Type Code, example PID.3.5. HL7 Data Table 0203 # pattern - Regex pattern used to randomly generate the identifier. Default is \d{10} which would generate an # identifier like 5992657933. - def initialize(**init_args) + def initialize(init_args = {}) @identifier_type_code = init_args[:type_code].nil? ? '' : init_args[:type_code] identifier_pattern = init_args[:pattern].nil? ? '\d{10}' : init_args[:pattern] @identifier = Regexp.new(identifier_pattern).random_example