Class: Berta::Settings

Inherits:
Settingslogic
  • Object
show all
Defined in:
lib/berta/settings.rb

Overview

Class for storing setting for Berta

Constant Summary collapse

CONFIGURATION =
'berta.yml'.freeze

Class Method Summary collapse

Class Method Details

.expiration_offsetNumeric

Expiration offset can be written in settings file in human readable form. This function will return expiration offset value as integer.

Returns:

  • (Numeric)

    Expiration offset



33
34
35
# File 'lib/berta/settings.rb', line 33

def self.expiration_offset
  ChronicDuration.parse(get('expiration.offset'))
end

.notification_deadlineNumeric

Notification deadline can be written in settings file in human readable form. This function will return notification deadline value as integer.

Returns:

  • (Numeric)

    Notification deadline



24
25
26
# File 'lib/berta/settings.rb', line 24

def self.notification_deadline
  ChronicDuration.parse(get('notification.deadline'))
end