lib/junoser/xsd/restriction.rb in junoser-0.3.3 vs lib/junoser/xsd/restriction.rb in junoser-0.3.4

- old
+ new

@@ -28,11 +28,19 @@ end def to_s return format('arg') if config.empty? - str = '(' + config.map {|c| c.to_s.strip }.join(' | ') + ')' + str = enumeration? ? 'enum' : '' + str += '(' + config.map {|c| c.to_s.strip }.join(' | ') + ')' format(str) + end + + + private + + def enumeration? + children.reject {|c| c.name != 'enumeration'}.empty? end end end end