Sha256: 54a78462aadc52505a96e866b85e487ddf39224ef7ab181b852f132d29061b25

Contents?: true

Size: 447 Bytes

Versions: 158

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/messaging"

module Renalware
  module Messaging
    module Internal
      class MessagePresenter < SimpleDelegator
        def age_in_days
          (Time.zone.now.to_date - sent_at.to_date).to_i
        end

        def html_identifier
          "message-#{id}"
        end

        def html_preview_identifier
          "message-preview-#{id}"
        end
      end
    end
  end
end

Version data entries

158 entries across 158 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.1.0 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.167 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.166 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.165 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.164 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.163 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.162 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.161 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.160 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.159 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.158 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.157 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.156 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.155 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.153 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.152 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.151 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.149 app/presenters/renalware/messaging/internal/message_presenter.rb
renalware-core-2.0.148 app/presenters/renalware/messaging/internal/message_presenter.rb