Module: Schematic::Serializers::Xsd
- Defined in:
- lib/schematic/serializers/xsd.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(klass) ⇒ Object
5 6 7 8 |
# File 'lib/schematic/serializers/xsd.rb', line 5 def extended(klass) raise ClassMissingXmlSerializer unless klass.ancestors.include?(ActiveModel::Serializers::Xml) raise ClassMissingAttributes unless klass.instance_methods.include?(:attributes) end |
Instance Method Details
#schematic(&block) ⇒ Object
11 12 13 |
# File 'lib/schematic/serializers/xsd.rb', line 11 def schematic(&block) schematic_sandbox.run(&block) end |
#schematic_sandbox ⇒ Object
15 16 17 |
# File 'lib/schematic/serializers/xsd.rb', line 15 def schematic_sandbox @schematic_sandbox ||= Schematic::Generator::Sandbox.new(self) end |
#to_xsd(options = {}) ⇒ Object
19 20 21 |
# File 'lib/schematic/serializers/xsd.rb', line 19 def to_xsd( = {}) schematic_sandbox.to_xsd() end |