Module: YamlExporter::ClassMethods

Defined in:
lib/yaml_exporter.rb

Instance Method Summary collapse

Instance Method Details

#yaml_schemaObject



37
38
39
# File 'lib/yaml_exporter.rb', line 37

def yaml_schema
  YamlExporter::Schema.generate(yaml_structure_definition)
end

#yaml_structure(&block) ⇒ Object



31
32
33
34
35
# File 'lib/yaml_exporter.rb', line 31

def yaml_structure(&block)
  class_attribute :yaml_structure_definition, instance_writer: false
  self.yaml_structure_definition = YamlExporter::Builder.new(self, &block).build
  include InstanceMethods
end