Sha256: 8b8252be60ae58b34772bc63cbebedda76c23fbf26e2cfce1613d776507e3e22

Contents?: true

Size: 722 Bytes

Versions: 54

Compression:

Stored size: 722 Bytes

Contents

module BulletTrain
  class Configuration
    include Singleton
    attr_accessor :strong_passwords, :enable_bulk_invitations, :incoming_webhooks_parent_class_name

    @@config = nil

    def initialize
      @@config = self

      # Default values
      @strong_passwords = true
      @enable_bulk_invitations = false
      @incoming_webhooks_parent_class_name = "ApplicationRecord"
    end

    class << self
      def strong_passwords
        @@config&.strong_passwords
      end

      def enable_bulk_invitations
        @@config&.enable_bulk_invitations
      end

      def incoming_webhooks_parent_class_name
        @@config&.incoming_webhooks_parent_class_name || "ApplicationRecord"
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
bullet_train-1.14.0 lib/bullet_train/configuration.rb
bullet_train-1.13.0 lib/bullet_train/configuration.rb
bullet_train-1.12.3 lib/bullet_train/configuration.rb
bullet_train-1.12.2 lib/bullet_train/configuration.rb
bullet_train-1.12.1 lib/bullet_train/configuration.rb
bullet_train-1.12.0 lib/bullet_train/configuration.rb
bullet_train-1.11.0 lib/bullet_train/configuration.rb
bullet_train-1.10.0 lib/bullet_train/configuration.rb
bullet_train-1.9.0 lib/bullet_train/configuration.rb
bullet_train-1.8.5 lib/bullet_train/configuration.rb
bullet_train-1.8.4 lib/bullet_train/configuration.rb
bullet_train-1.8.3 lib/bullet_train/configuration.rb
bullet_train-1.8.2 lib/bullet_train/configuration.rb
bullet_train-1.8.1 lib/bullet_train/configuration.rb
bullet_train-1.8.0 lib/bullet_train/configuration.rb
bullet_train-1.7.23 lib/bullet_train/configuration.rb
bullet_train-1.7.22 lib/bullet_train/configuration.rb
bullet_train-1.7.21 lib/bullet_train/configuration.rb
bullet_train-1.7.20 lib/bullet_train/configuration.rb
bullet_train-1.7.19 lib/bullet_train/configuration.rb