lib/junoser/xsd/restriction.rb in junoser-0.2.13 vs lib/junoser/xsd/restriction.rb in junoser-0.3.0

- old
+ new

@@ -1,7 +1,8 @@ require 'junoser/xsd/base' require 'junoser/xsd/enumeration' +require 'junoser/xsd/simple_type' module Junoser module Xsd class Restriction include Base @@ -15,13 +16,16 @@ def config @config ||= children.map {|child| case child.name when 'enumeration' Junoser::Xsd::Enumeration.new(child, depth: @depth+1) + when 'simpleType' + Junoser::Xsd::SimpleType.new(child, depth: @depth+1) + when 'attribute' else raise "ERROR: unknown element: #{child.name}" end - } + }.compact end def to_s return format('arg') if config.empty?