Class: Dsu::Presenters::BasePresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Dsu::Presenters::BasePresenter
- Includes:
- Support::ColorThemable
- Defined in:
- lib/dsu/presenters/base_presenter.rb
Direct Known Subclasses
ColorThemePresenter, ColorThemeShowPresenter, ConfigurationPresenter, EntryGroupPresenter, EntryPresenter
Instance Attribute Summary collapse
-
#color_theme ⇒ Object
readonly
Returns the value of attribute color_theme.
Instance Method Summary collapse
-
#initialize(object, options: {}) ⇒ BasePresenter
constructor
A new instance of BasePresenter.
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) = || {} theme_name = .fetch(:theme_name, Models::Configuration.new.theme_name) @color_theme = Models::ColorTheme.find(theme_name: theme_name) end |
Instance Attribute Details
#color_theme ⇒ Object (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 |