Class: ODDB::AtcClass::DDD

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

Constant Summary

EXPORT_PROPERTIES =
[
  '@administration_route',
  '@dose',
  '@note',
]

Constants included from OddbYaml

EXPORT_PROPERTIES, YAML_URI

Constants included from Persistence

ODBA_PREDEFINE_SERIALIZABLE

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from OddbYaml

#to_yaml_properties, #to_yaml_type

Methods included from PersistenceMethods

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

Constructor Details

- (DDD) initialize(roa)

A new instance of DDD



22
23
24
25
# File 'src/model/atcclass.rb', line 22

def initialize(roa)
  @key = roa
  @administration_route = roa[0,1]
end

Instance Attribute Details

- (Object) administration_route

Returns the value of attribute administration_route



21
22
23
# File 'src/model/atcclass.rb', line 21

def administration_route
  @administration_route
end

- (Object) dose

Returns the value of attribute dose



21
22
23
# File 'src/model/atcclass.rb', line 21

def dose
  @dose
end

- (Object) note

Returns the value of attribute note



21
22
23
# File 'src/model/atcclass.rb', line 21

def note
  @note
end

Instance Method Details

- (Object) ==(other)



26
27
28
29
30
31
32
33
34
35
36
# File 'src/model/atcclass.rb', line 26

def ==(other)
  if(other.is_a? Hash)
    @dose == other[:dose] && @note == other[:note] \
      && @administration_route == other[:administration_route]
  elsif(other.is_a? DDD)
    @dose == other.dose && @note == other.note \
      && @administration_route == other.administration_route
  else
    false
  end
end