Module: YamlExporter::ClassMethods
- Defined in:
- lib/yaml_exporter.rb
Instance Method Summary collapse
Instance Method Details
#yaml_schema ⇒ Object
18 19 20 |
# File 'lib/yaml_exporter.rb', line 18 def yaml_schema YamlSerializable::YamlExporter.generate_schema(self, yaml_structure_definition) end |
#yaml_structure(&block) ⇒ Object
12 13 14 15 16 |
# File 'lib/yaml_exporter.rb', line 12 def yaml_structure(&block) class_attribute :yaml_structure_definition, instance_writer: false self.yaml_structure_definition = YamlSerializable::StructureBuilder.new(&block).build include InstanceMethods end |