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

#remote, #source

Instance Method Summary collapse

Methods inherited from Object

delegate, #uid

Constructor Details

#initialize(*args) ⇒ Atc

Returns a new instance of Atc.



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

def initialize *args
  super
  @ddds = {}
end

Instance Method Details

#ddds(administration) ⇒ Object



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

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

#interesting?Boolean

Returns:

  • (Boolean)


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

def interesting?
  false
end

#nameObject



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

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