Class: ODDB::CyP450SubstrateConnection

Inherits:
CyP450Connection show all
Defined in:
ext/export/src/oddb_yaml.rb,
src/model/cyp450connection.rb,
test/test_model/cyp450connection.rb

Constant Summary

EXPORT_PROPERTIES =
[
  '@oid',
  '@cyp450',
  '@category',
  '@links',
  '@substance',
]

Constants included from Persistence

ODBA_PREDEFINE_SERIALIZABLE

Constants included from OddbYaml

EXPORT_PROPERTIES, YAML_URI

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from CyP450Connection

#init

Methods included from PersistenceMethods

#checkout, #data_origin, #data_origins, #diff, #init, #nil_if_empty, #parent, #pointer_descr, #structural_ancestors, #undiffable?, #update_values

Methods included from OddbYaml

#to_yaml_properties, #to_yaml_type

Constructor Details

- (CyP450SubstrateConnection) initialize(cyp_id)

A new instance of CyP450SubstrateConnection



49
50
51
52
# File 'src/model/cyp450connection.rb', line 49

def initialize(cyp_id)
  super()
  @cyp_id = cyp_id
end

Instance Attribute Details

- (Object) cyp450

Returns the value of attribute cyp450



47
48
49
# File 'src/model/cyp450connection.rb', line 47

def cyp450
  @cyp450
end

- (Object) cyp_id (readonly)

Returns the value of attribute cyp_id



48
49
50
# File 'src/model/cyp450connection.rb', line 48

def cyp_id
  @cyp_id
end

Instance Method Details

- (Object) adjust_types(values, app)



60
61
62
63
64
65
# File 'src/model/cyp450connection.rb', line 60

def adjust_types(values, app)
  if(cyp_id = values[:cyp450])
    values.store(:cyp450, app.cyp450(cyp_id))
  end
  values
end

- (Object) interactions_with(substance)



53
54
55
56
57
58
59
# File 'src/model/cyp450connection.rb', line 53

def interactions_with(substance)
  if(@cyp450)
    @cyp450.interactions_with(substance)
  else
    []
  end
end