Sha256: 197f17753e4a5fae8e16a34cc7166a56fa453cc41b58c4819bcd65412b613b0b

Contents?: true

Size: 461 Bytes

Versions: 13

Compression:

Stored size: 461 Bytes

Contents

require 'junoser/xsd/base'

module Junoser
  module Xsd
    class Union
      include Base

      def config
        @config ||= children.map {|child|
          case child.name
          when 'simpleType'
            Junoser::Xsd::SimpleType.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

Version Path
junoser-0.3.12 lib/junoser/xsd/union.rb
junoser-0.3.11 lib/junoser/xsd/union.rb
junoser-0.3.10 lib/junoser/xsd/union.rb
junoser-0.3.9 lib/junoser/xsd/union.rb
junoser-0.3.8 lib/junoser/xsd/union.rb
junoser-0.3.7 lib/junoser/xsd/union.rb
junoser-0.3.6 lib/junoser/xsd/union.rb
junoser-0.3.5 lib/junoser/xsd/union.rb
junoser-0.3.4 lib/junoser/xsd/union.rb
junoser-0.3.3 lib/junoser/xsd/union.rb
junoser-0.3.2 lib/junoser/xsd/union.rb
junoser-0.3.1 lib/junoser/xsd/union.rb
junoser-0.3.0 lib/junoser/xsd/union.rb