Sha256: 859036ede71cc85f54917aae59ad825dec37ae0173ce8c96052e7cb2ee02fc15
Contents?: true
Size: 613 Bytes
Versions: 13
Compression:
Stored size: 613 Bytes
Contents
require 'junoser/xsd/base' require 'junoser/xsd/restriction' require 'junoser/xsd/union' module Junoser module Xsd class SimpleType include Base def config @config ||= children.map {|child| case child.name when 'restriction' Junoser::Xsd::Restriction.new(child, depth: @depth+1) when 'union' Junoser::Xsd::Union.new(child, depth: @depth+1) else raise "ERROR: unknown element: #{child.name}" end } end def to_s format(config.first.to_s.strip) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems