Class: ODDB::Remote::Drugs::Atc

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

Instance Attribute Summary

Attributes inherited from Object

#source

Instance Method Summary collapse

Methods inherited from Object

delegate, #uid

Constructor Details

#initialize(*args) ⇒ Atc

Returns a new instance of Atc.



12
13
14
15
# File 'lib/oddb/remote/drugs/atc.rb', line 12

def initialize *args
  super
  @ddds = {}
end

Instance Method Details

#ddds(administration) ⇒ Object



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

def ddds(administration)
  @ddds[administration] ||= @remote.ddds.inject([]) { |memo, (roa, ddd)| 
    memo.push ddd if roa == administration 
    memo
  }
end

#interesting?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/oddb/remote/drugs/atc.rb', line 25

def interesting?
  false
end

#nameObject



16
17
18
# File 'lib/oddb/remote/drugs/atc.rb', line 16

def name
  @name ||= Util::Multilingual.new(:de => @remote.name)
end