Sha256: 96d830bf03cc138f39860d163184b5a21feb00b60342cea8e66ba9f14dba87bd
Contents?: true
Size: 942 Bytes
Versions: 2
Compression:
Stored size: 942 Bytes
Contents
# frozen_string_literal: true module NotificationSettings class << self attr_writer :configuration def configuration @configuration ||= Configuration.new end end def self.configure yield configuration end class Configuration attr_accessor :categories attr_accessor :default_category attr_accessor :last_seen attr_accessor :idle_after attr_accessor :offline_after attr_accessor :statuses attr_accessor :do_not_notify_statuses attr_accessor :do_not_deliver_statuses def initialize @categories = [:notification] @default_category = :notification @last_seen = :last_seen @idle_after = 10.minutes @offline_after = 3.hours @statuses = ['online', 'idle', 'offline', 'do not notify', 'do not disturb'] @do_not_notify_statuses = ['do not notify'] @do_not_deliver_statuses = ['do not disturb'] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
notification-settings-3.0.2 | lib/notification_settings/configuration.rb |
notification-settings-2.0.0 | lib/notification_settings/configuration.rb |