Sha256: 249281a412336f0935e26607794c6dc45b80bf10786917a4dd09755b881de7f0

Contents?: true

Size: 479 Bytes

Versions: 7

Compression:

Stored size: 479 Bytes

Contents

require_dependency "renalware"
require_dependency "renalware/address_presenter/single_line"

module Renalware
  class PatientPresenter < SimpleDelegator
    def address
      AddressPresenter::SingleLine.new(current_address)
    end

    def to_s(format = :long)
      super(format)
    end

    def nhs_number
      return super unless super.present? && super.length >= 10
      return if super.index(" ")
      "#{super[0..2]} #{super[3..5]} #{super[6..-1]}"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc5 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.rc4 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.rc3 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.rc1 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta12 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta11 app/presenters/renalware/patient_presenter.rb
renalware-core-2.0.0.pre.beta10 app/presenters/renalware/patient_presenter.rb