Class: ODDB::CyP450

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

Constant Summary collapse

EXPORT_PROPERTIES =
[
  '@cyp_id',
]

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



162
163
164
165
166
167
168
169
170
171
172
# File 'ext/export/src/oddb_yaml.rb', line 162

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('inhibitors', self.inhibitors.values)
			map.add('inducers', self.inducers.values)
		}
	}
end