Sha256: f8305c86ccd1b23d6926377422a87561fede15389e3eafc780276c4ee4516115

Contents?: true

Size: 565 Bytes

Versions: 19

Compression:

Stored size: 565 Bytes

Contents

module Renalware
  module Accesses
    class ProfilePresenter < DumbDelegator
      def formed_on
        ::I18n.l(super)
      end

      def started_on
        ::I18n.l(super)
      end

      def terminated_on
        ::I18n.l(super)
      end

      def side
        super.try(:text)
      end

      def plan_type
        current_plan.plan_type.to_s
      end

      def plan_date
        current_plan.created_at
      end

      private

      def current_plan
        @current_plan ||= patient.current_plan || NullObject.instance
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc10 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc9 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc8 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc7 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc6 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc5 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc4 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc3 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.rc1 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta12 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta11 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta10 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta9 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta8 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta7 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta6 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta5 app/presenters/renalware/accesses/profile_presenter.rb
renalware-core-2.0.0.pre.beta4 app/presenters/renalware/accesses/profile_presenter.rb