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