Class: ODDB::Dose

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

Overview

< Quanty

Constant Summary collapse

EXPORT_PROPERTIES =
[
	'@not_normalized',
	'@val',
	'@unit',
]

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



221
222
223
224
225
226
227
228
229
230
# File 'ext/export/src/oddb_yaml.rb', line 221

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('scale', self.scale)
		}
	}
end