Class: Renalware::Forms::Generic::Homecare::V1::Document

Inherits:
Base
  • Object
show all
Defined in:
lib/renalware/forms/generic/homecare/v1/document.rb

Constant Summary

Constants inherited from Base

Base::TABLE_WIDTH

Constants inherited from Base

Base::CHECKBOX, Base::EMPTY_CHECKBOX

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#heading, #table_styles

Methods inherited from Base

#borderless_table_style, #cell_with_leading_checkbox, #cell_with_trailing_checkbox, #underlined_table_style

Class Method Details

.build(args) ⇒ Object



8
9
10
# File 'lib/renalware/forms/generic/homecare/v1/document.rb', line 8

def self.build(args)
  new(args).tap(&:build)
end

Instance Method Details

#buildObject



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/renalware/forms/generic/homecare/v1/document.rb', line 20

def build
  Prawn::Font::AFM.hide_m17n_warning = true
  [
    Heading,
    PatientDetails,
    Medications,
    Allergies,
    PrescriptionDurations,
    DeliveryFrequencies,
    Signoff,
    Footer
  ].each { |klass| klass.new(document, args).build }
end

#documentObject



12
13
14
15
16
17
18
# File 'lib/renalware/forms/generic/homecare/v1/document.rb', line 12

def document
  @document ||= Prawn::Document.new(
    page_size: "A4",
    page_layout: :portrait,
    margin: [25, 25, 10, 25]
  )
end