Sha256: fa05d12b1258d260b25ab71934fceefe117d44a83f8abcd7cff81cf668fcb43c

Contents?: true

Size: 567 Bytes

Versions: 36

Compression:

Stored size: 567 Bytes

Contents

require 'action_view'
module WoopleTheme
  module Dashboard
    class ElectivesSectionPresenter < SectionPresenter
      enforce_definitions :electives_history,
                          :electives_exceptions,
                          :points_earned,
                          :points_total

      def render_history
        yield if render?(@delegate.electives_history)
      end

      def render_exceptions
        yield if render?(@delegate.electives_exceptions)
      end

      private

      def render?(tab)
        tab.count > 0
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
woople-theme-0.10.0 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.9.0 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.19 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.18 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.17 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.16 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.15 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.14 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.13 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.12 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.11 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.10 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.9 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.8 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.7 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.6 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.5 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.4 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.3 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.8.2 app/presenters/woople_theme/dashboard/electives_section_presenter.rb