Class: Dsu::Presenters::ColorThemePresenter
Instance Attribute Summary collapse
Instance Method Summary
collapse
apply_theme, #prompt_with_options
Constructor Details
#initialize(color_theme, options: {}) ⇒ ColorThemePresenter
Returns a new instance of ColorThemePresenter.
10
11
12
13
14
|
# File 'lib/dsu/presenters/color_theme_presenter.rb', line 10
def initialize(color_theme, options: {})
super
@color_theme = color_theme
end
|
Instance Attribute Details
#color_theme ⇒ Object
Returns the value of attribute color_theme.
8
9
10
|
# File 'lib/dsu/presenters/color_theme_presenter.rb', line 8
def color_theme
@color_theme
end
|
Instance Method Details
#detail ⇒ Object
26
27
28
29
|
# File 'lib/dsu/presenters/color_theme_presenter.rb', line 26
def detail
"#{apply_theme(theme_name_formatted, theme_color: color_theme.body)} - " \
"#{apply_theme(description, theme_color: color_theme.body)}"
end
|
#detail_with_index(index:) ⇒ Object
31
32
33
|
# File 'lib/dsu/presenters/color_theme_presenter.rb', line 31
def detail_with_index(index:)
"#{formatted_index(index: index)} #{detail}"
end
|
21
22
23
24
|
# File 'lib/dsu/presenters/color_theme_presenter.rb', line 21
def
= I18n.t('presenters.color_theme_presenter.headers.current_theme')
apply_theme(, theme_color: color_theme.)
end
|
16
17
18
19
|
# File 'lib/dsu/presenters/color_theme_presenter.rb', line 16
def
= I18n.t('presenters.color_theme_presenter.headers.color_themes')
apply_theme(, theme_color: color_theme.)
end
|