lib/ncs_navigator/mdes/variable.rb in ncs_mdes-0.3.1 vs lib/ncs_navigator/mdes/variable.rb in ncs_mdes-0.4.0

- old
+ new

@@ -55,10 +55,15 @@ # @return [Variable] a new variable instance def from_element(element, options={}) log = options[:log] || NcsNavigator::Mdes.default_logger new(element['name']).tap do |var| - var.required = (element['nillable'] == 'false') + var.required = + if element['minOccurs'] + element['minOccurs'] != '0' + else + element['nillable'] == 'false' + end var.pii = case element['pii'] when 'Y'; true; when 'P'; :possible; when nil; :unknown;