Class: ODDB::Registration

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

Overview

< RegistrationCommon

Constant Summary collapse

EXPORT_PROPERTIES =
[
	'@iksnr',
	'@registration_date',
	'@revision_date',
	'@expiration_date',
	'@inactive_date',
	'@sequences',
	'@indication',
	'@export_flag',
]

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



462
463
464
465
466
467
468
469
470
471
472
473
474
475
# File 'ext/export/src/oddb_yaml.rb', line 462

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 ) )
			}
        if @fachinfo
          map.add('fachinfo_oid', @fachinfo.oid)
        end
			map.add('generic_type', self.generic_type)
			map.add('complementary_type', self.complementary_type)
		}
	}
end