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.5.9 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.8 app/presenters/woople_theme/dashboard/section_presenter.rb
woople-theme-0.5.7 app/presenters/woople_theme/dashboard/section_presenter.rb