Class: ODDB::Remote::Drugs::Sequence

Inherits:
Object
  • Object
show all
Defined in:
lib/oddb/remote/drugs/sequence.rb

Instance Attribute Summary

Attributes inherited from Object

#remote, #source

Instance Method Summary collapse

Methods inherited from Object

delegate, #initialize, #uid

Constructor Details

This class inherits a constructor from ODDB::Remote::Object

Instance Method Details

#atcObject



12
13
14
15
16
17
18
# File 'lib/oddb/remote/drugs/sequence.rb', line 12

def atc
  @atc or begin
    if atc = @remote.atc_class
      @atc = Remote::Drugs::Atc.new @source, atc
    end
  end
end

#fachinfoObject



19
20
21
22
23
24
25
# File 'lib/oddb/remote/drugs/sequence.rb', line 19

def fachinfo
  @fachinfo or begin
    if fi = @remote.fachinfo
      Remote::Util::M10lDocument.new @source, fi
    end
  end
end

#packagesObject



26
27
28
29
30
# File 'lib/oddb/remote/drugs/sequence.rb', line 26

def packages
  @remote.packages.collect do |ikscd, pac|
    Remote::Drugs::Package.new @source, pac
  end
end

#patinfoObject



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/oddb/remote/drugs/sequence.rb', line 31

def patinfo
  @patinfo or begin
    if pi = @remote.patinfo
      pi.descriptions.each do |key, doc|
        if doc.respond_to?(:__drbref=)
          doc.__drbref = @remote.__drbref + "@patinfo:#{key}"
        end
      end
      Remote::Util::M10lDocument.new @source, pi
    end
  end
end