Sha256: c9f8f78cab2cee56d943e141e36e7e344c69e4d29c5828f9af848481a5964176

Contents?: true

Size: 576 Bytes

Versions: 6

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

require 'delegate'
require_relative '../models/color_theme'
require_relative '../support/color_themable'

module Dsu
  module Presenters
    class BasePresenterEx
      include Support::ColorThemable

      def initialize(options: {})
        @options = options || {}
        @color_theme = Models::ColorTheme.find(theme_name: theme_name)
      end

      private

      attr_reader :color_theme, :options

      def theme_name
        @theme_name ||= options.fetch(:theme_name, Models::Configuration.new.theme_name)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dsu-2.4.2 lib/dsu/presenters/base_presenter_ex.rb
dsu-2.4.1 lib/dsu/presenters/base_presenter_ex.rb
dsu-2.4.0 lib/dsu/presenters/base_presenter_ex.rb
dsu-2.3.2 lib/dsu/presenters/base_presenter_ex.rb
dsu-2.3.1 lib/dsu/presenters/base_presenter_ex.rb
dsu-2.3.0 lib/dsu/presenters/base_presenter_ex.rb