Sha256: 640b1cbd317e47630c4041541c674edbd60e061e8b4c4a3cca960ed9ec9eae8a

Contents?: true

Size: 558 Bytes

Versions: 28

Compression:

Stored size: 558 Bytes

Contents

module LibXML
  module XML
    class Schema::Type
      def kind_name
        Schema::Types.constants.find { |k| Schema::Types.const_get(k) == kind }
      end

      def annonymus_subtypes
        elements.select { |_, e| e.type.name.nil? }
      end

      def annonymus_subtypes_recursively(parent=nil)
        annonymus_subtypes.map do |element_name, e|
          [{[parent, element_name].compact.join('::') => e.type},
           e.type.annonymus_subtypes_recursively(element_name)]
        end.flatten
      end

    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
libxml-ruby-5.0.3-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-5.0.3 lib/libxml/schema/type.rb
libxml-ruby-5.0.2-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-5.0.2 lib/libxml/schema/type.rb
libxml-ruby-5.0.1-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-5.0.1 lib/libxml/schema/type.rb
libxml-ruby-5.0.0-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-5.0.0 lib/libxml/schema/type.rb
libxml-ruby-4.1.2-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-4.1.2 lib/libxml/schema/type.rb
libxml-ruby-4.1.1-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-4.1.1 lib/libxml/schema/type.rb
libxml-ruby-4.1.0 lib/libxml/schema/type.rb
libxml-ruby-4.0.0-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-4.0.0 lib/libxml/schema/type.rb
libxml-ruby-3.2.4-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-3.2.4 lib/libxml/schema/type.rb
libxml-ruby-3.2.3-x64-mingw-ucrt lib/libxml/schema/type.rb
libxml-ruby-3.2.3 lib/libxml/schema/type.rb
libxml-ruby-3.2.2-x64-mingw32 lib/libxml/schema/type.rb