Class: ODDB::Fachinfo

Inherits:
Object show all
Includes:
OddbYaml
Defined in:
ext/export/src/oddb_yaml.rb

Constant Summary collapse

EXPORT_PROPERTIES =
[
	'@oid',
	'@descriptions',
]

Constants included from OddbYaml

OddbYaml::YAML_URI

Instance Method Summary collapse

Methods included from OddbYaml

#to_yaml_properties, #to_yaml_type

Instance Method Details

#to_yaml(opts = {}) ⇒ Object



243
244
245
246
247
248
249
250
251
252
# File 'ext/export/src/oddb_yaml.rb', line 243

def to_yaml( opts = {} )
	YAML::quick_emit( self.object_id, opts ) { |out|
		out.map( taguri ) { |map|
			to_yaml_properties.each { |m|
				map.add( m[1..-1], instance_variable_get( m ) )
			}
			map.add('article_codes', self.article_codes)
		}
	}
end