Sha256: 3980af4816065cf193b6d5bcc63cd3c3e2ec5757154974ce6cbf4a18712a7546

Contents?: true

Size: 609 Bytes

Versions: 13

Compression:

Stored size: 609 Bytes

Contents

module Schematic
  module Serializers
    module Xsd
      class << self
        def extended(klass)
          raise ClassMissingXmlSerializer unless klass.ancestors.include?(ActiveModel::Serializers::Xml)
          raise ClassMissingAttributes unless klass.instance_methods.include?(:attributes)
        end
      end

      def schematic(&block)
        schematic_sandbox.run(&block)
      end

      def schematic_sandbox
        @schematic_sandbox ||= Schematic::Generator::Sandbox.new(self)
      end

      def to_xsd(options = {})
        schematic_sandbox.to_xsd(options)
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
schematic-0.6.2 lib/schematic/serializers/xsd.rb
schematic-0.6.1 lib/schematic/serializers/xsd.rb
schematic-0.6.0 lib/schematic/serializers/xsd.rb
schematic-0.5.9 lib/schematic/serializers/xsd.rb
schematic-0.5.8 lib/schematic/serializers/xsd.rb
schematic-0.5.7 lib/schematic/serializers/xsd.rb
schematic-0.5.6 lib/schematic/serializers/xsd.rb
schematic-0.5.5 lib/schematic/serializers/xsd.rb
schematic-0.5.4 lib/schematic/serializers/xsd.rb
schematic-0.5.3 lib/schematic/serializers/xsd.rb
schematic-0.5.2 lib/schematic/serializers/xsd.rb
schematic-0.5.1 lib/schematic/serializers/xsd.rb
schematic-0.5.0 lib/schematic/serializers/xsd.rb