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.8.1 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.8.0 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.27 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.26 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.25 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.24 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.23 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.22 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.21 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.20 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.19 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.18 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.17 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.14 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.13 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb
woople-theme-0.6.12 app/presenters/woople_theme/dashboard/essentials_section_presenter.rb