Class: StimulusPlumbers::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/stimulus_plumbers/configuration.rb

Constant Summary collapse

DEFAULT_LOG_FORMATTER =
->(message) { "[StimulusPlumbers] #{message}" }

Instance Method Summary collapse

Instance Method Details

#log_formatterObject



14
15
16
# File 'lib/stimulus_plumbers/configuration.rb', line 14

def log_formatter
  @log_formatter ||= DEFAULT_LOG_FORMATTER
end

#log_formatter=(callable) ⇒ Object

Raises:

  • (ArgumentError)


18
19
20
21
22
# File 'lib/stimulus_plumbers/configuration.rb', line 18

def log_formatter=(callable)
  raise ArgumentError, "log_formatter must respond to #call" unless callable.respond_to?(:call)

  @log_formatter = callable
end

#themeObject



10
11
12
# File 'lib/stimulus_plumbers/configuration.rb', line 10

def theme
  @theme ||= Themes::Configuration.new
end