Class: ODDB::ActiveAgent

Inherits:
ActiveAgentCommon show all
Includes:
OddbYaml
Defined in:
ext/export/src/oddb_yaml.rb,
src/model/activeagent.rb

Overview

< ActiveAgentCommon

Constant Summary

ODBA_PREFETCH =
true
EXPORT_PROPERTIES =
[
  '@substance',
  '@dose',
]

Constants included from OddbYaml

EXPORT_PROPERTIES, YAML_URI

Constants included from Persistence

ODBA_PREDEFINE_SERIALIZABLE

Instance Method Summary (collapse)

Methods included from OddbYaml

#to_yaml_properties, #to_yaml_type

Methods inherited from ActiveAgentCommon

#<=>, #==, #adjust_types, #checkout, #init, #initialize, #same_as?, #to_a, #to_s

Methods included from Persistence

#initialize

Methods included from PersistenceMethods

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

Constructor Details

This class inherits a constructor from ODDB::ActiveAgentCommon

Instance Method Details

- (Object) substance=(substance)



96
97
98
99
100
101
102
103
104
105
106
107
# File 'src/model/activeagent.rb', line 96

def substance=(substance)
  unless(substance.nil? || @substance == substance)
    if(@substance.respond_to?(:remove_sequence))
      @substance.remove_sequence(@sequence)
    end
    @substance = substance
    if substance
      substance.add_sequence @sequence
    end
  end
  @substance
end