Class: Renalware::BloodPressure

Inherits:
NestedAttribute show all
Defined in:
app/documents/renalware/blood_pressure.rb

Constant Summary

Constants inherited from Document::Embedded

Document::Embedded::STRIPPABLE_TYPES

Instance Method Summary collapse

Methods inherited from NestedAttribute

#nested_attribute?, #to_partial_path

Methods inherited from Document::Embedded

attribute, attributes_list, #method_missing, old_attribute, old_attributes, #strip_leading_trailing_whitespace_from_numbers

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Document::Embedded

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/documents/renalware/blood_pressure.rb', line 18

def blank?
  systolic.blank? && diastolic.blank?
end

#to_sObject



12
13
14
15
16
# File 'app/documents/renalware/blood_pressure.rb', line 12

def to_s
  return "" unless systolic.present? && diastolic.present?

  "#{systolic} / #{diastolic}"
end