Class: ODDB::Remote::Drugs::Part
- Inherits:
-
Object
- Object
- Object
- ODDB::Remote::Drugs::Part
show all
- Defined in:
- lib/oddb/remote/drugs/part.rb
Instance Attribute Summary
Attributes inherited from Object
#remote, #source
Instance Method Summary
collapse
Methods inherited from Object
delegate, #initialize, #uid
Instance Method Details
#comparable_size ⇒ Object
11
12
13
|
# File 'lib/oddb/remote/drugs/part.rb', line 11
def comparable_size
@comparable_size ||= @remote.comparable_size
end
|
14
15
16
|
# File 'lib/oddb/remote/drugs/part.rb', line 14
def quantity
nil
end
|
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/oddb/remote/drugs/part.rb', line 17
def unit
@unit ||= begin
cstr = if comform = @remote.commercial_form
comform.de
else
comparable_size.unit
end
@unit = Remote::Drugs::Unit.new(@source, cstr)
end
end
|