Sha256: 01caf1e47b9001c2245aad02a252456ba31714583202c063492a6ac1e3bfa9c6

Contents?: true

Size: 997 Bytes

Versions: 24

Compression:

Stored size: 997 Bytes

Contents

# encoding: utf-8

module Backup
  module Configuration
    module Notifier
      class Base < Backup::Configuration::Base
        class << self

          ##
          # When set to true, the user will be notified by email
          # when a backup process ends without raising any exceptions
          attr_writer :on_success

          ##
          # When set to true, the user will be notified by email
          # when a backup process raises an exception before finishing
          attr_writer :on_failure

        end

        ##
        # When @on_success is nil it means it hasn't been defined
        # and will then default to true
        def self.on_success
          return true if @on_success.nil?
          @on_success
        end

        ##
        # When @on_failure is nil it means it hasn't been defined
        # and will then default to true
        def self.on_failure
          return true if @on_failure.nil?
          @on_failure
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
backup-3.0.1.build.0 lib/backup/configuration/notifier/base.rb
backup-3.0.1 lib/backup/configuration/notifier/base.rb
backup-3.0.0.build.0 lib/backup/configuration/notifier/base.rb
backup-3.0.0 lib/backup/configuration/notifier/base.rb