Sha256: f02961e0112e2ea8d5f28fe804de1b7abc7be403375af46ea7df0da02dfe2be2

Contents?: true

Size: 294 Bytes

Versions: 23

Compression:

Stored size: 294 Bytes

Contents

require 'explicit_delegator'

module WoopleTheme
  module Dashboard
    class SectionPresenter < ExplicitDelegator
      enforce_definitions :enabled?

      def render
        yield if section.enabled?
      end

      private

      def section
        __getobj__
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
woople-theme-0.6.11 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.10 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.9 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.8 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.7 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.6 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.5 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.4 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.3 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.2 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6.1 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.6 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.17 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.16 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.15 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.14 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.13 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.12 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.11 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.10 app/presenters/woople_theme/dashboard/section_presenter.rb