Sha256: c4a6b354980781a15e8fa434a2d98175ade746517970bf766d4515de8265b4c2

Contents?: true

Size: 641 Bytes

Versions: 36

Compression:

Stored size: 641 Bytes

Contents

require 'action_view'

module WoopleTheme
  module Dashboard
    class EssentialsSectionPresenter < SectionPresenter
      enforce_definitions :essentials_remaining,
                          :essentials_completed,
                          :essentials_exceptions

      def render_remaining
        yield if render?(@delegate.essentials_remaining)
      end

      def render_completed
        yield if render?(@delegate.essentials_completed)
      end

      def render_exceptions
        yield if render?(@delegate.essentials_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/essentials_section_presenter.rb
woople-theme-0.9.0 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.19 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.18 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.17 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.16 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.15 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.14 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.13 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.12 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.11 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.10 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.9 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.8 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.7 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.6 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.5 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.4 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.3 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.2 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb