Class: StimulusPlumbers::Configuration
- Inherits:
-
Object
- Object
- StimulusPlumbers::Configuration
- Defined in:
- lib/stimulus_plumbers/configuration.rb
Constant Summary collapse
- DEFAULT_LOG_FORMATTER =
->() { "[StimulusPlumbers] #{}" }
- THEME_KLASS_FORMATTER =
->(type) { "StimulusPlumbers::Themes::#{type.to_s.classify}Theme" }
Instance Method Summary collapse
Instance Method Details
#log_formatter ⇒ Object
19 20 21 |
# File 'lib/stimulus_plumbers/configuration.rb', line 19 def log_formatter @log_formatter ||= DEFAULT_LOG_FORMATTER end |
#log_formatter=(callable) ⇒ Object
23 24 25 26 27 |
# File 'lib/stimulus_plumbers/configuration.rb', line 23 def log_formatter=(callable) raise ArgumentError, "log_formatter must respond to #call" unless callable.respond_to?(:call) @log_formatter = callable end |
#theme ⇒ Object
11 12 13 |
# File 'lib/stimulus_plumbers/configuration.rb', line 11 def theme @theme ||= build_theme(:tailwind) end |
#theme=(value) ⇒ Object
15 16 17 |
# File 'lib/stimulus_plumbers/configuration.rb', line 15 def theme=(value) @theme = build_theme(value) end |