Sha256: 51316ed7c4bccee289ed43cbbd113c1dc3acc6f8cd587e5c477648c2feea3241

Contents?: true

Size: 881 Bytes

Versions: 2

Compression:

Stored size: 881 Bytes

Contents

require_dependency "renalware"

module Renalware
  module Messaging
    module_function
    def table_name_prefix
      "messaging_"
    end

    def cast_patient(patient)
      ActiveType.cast(patient, ::Renalware::Messaging::Patient)
    end

    def cast_author(author)
      ActiveType.cast(author, ::Renalware::Messaging::Author)
    end

    # def cast_recipient(recipient)
    #   ActiveType.cast(recipient, ::Renalware::Messaging::Recipient)
    # end

    module Internal
      module_function
      def cast_patient(patient)
        ActiveType.cast(patient, ::Renalware::Messaging::Internal::Patient)
      end

      def cast_author(author)
        ActiveType.cast(author, ::Renalware::Messaging::Internal::Author)
      end

      def cast_recipient(recipient)
        ActiveType.cast(recipient, ::Renalware::Messaging::Internal::Recipient)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta9 app/models/renalware/messaging.rb
renalware-core-2.0.0.pre.beta8 app/models/renalware/messaging.rb