Class: RushJob::Settings
- Inherits:
-
Object
- Object
- RushJob::Settings
- Defined in:
- app/services/rush_job/settings.rb
Constant Summary collapse
- RUSH_JOB_SETTINGS =
{ theme: %w[light dark], editing: %w[disabled enabled] }.freeze
Class Method Summary collapse
Class Method Details
.change_setting(setting, value) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/services/rush_job/settings.rb', line 8 def self.change_setting(setting, value) return unless RUSH_JOB_SETTINGS[setting.to_sym] if RUSH_JOB_SETTINGS[setting.to_sym][1] == value RUSH_JOB_SETTINGS[setting.to_sym][0] else RUSH_JOB_SETTINGS[setting.to_sym][1] end end |