lib/schematic/generator/sandbox.rb in schematic-0.6.2 vs lib/schematic/generator/sandbox.rb in schematic-0.7.0
- old
+ new
@@ -1,5 +1,8 @@
+require 'builder'
+require 'schematic/generator/xsd'
+
module Schematic
module Generator
class Sandbox
attr_accessor :ignored_elements, :added_elements, :required_elements, :non_required_elements
@@ -18,10 +21,10 @@
def xsd_generator
@xsd_generator ||= Schematic::Generator::Xsd.new(@klass)
end
def to_xsd(options = {})
- output = ""
+ output = ''
builder = Builder::XmlMarkup.new(:target => output, :indent => 2)
xsd_generator.options = options
xsd_generator.header(builder)
xsd_generator.schema(builder)
output