Class: Dsu::Presenters::BasePresenter

Inherits:
SimpleDelegator
  • Object
show all
Includes:
Support::ColorThemable
Defined in:
lib/dsu/presenters/base_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::ColorThemable

apply_theme, #prompt_with_options

Constructor Details

#initialize(object, options: {}) ⇒ BasePresenter

Returns a new instance of BasePresenter.



14
15
16
17
18
19
20
# File 'lib/dsu/presenters/base_presenter.rb', line 14

def initialize(object, options: {})
  super(object)

  @options = options || {}
  theme_name = options.fetch(:theme_name, Models::Configuration.new.theme_name)
  @color_theme = Models::ColorTheme.find(theme_name: theme_name)
end

Instance Attribute Details

#color_themeObject (readonly)

Returns the value of attribute color_theme.



12
13
14
# File 'lib/dsu/presenters/base_presenter.rb', line 12

def color_theme
  @color_theme
end