Class: BulletTrain::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/bullet_train/configuration.rb

Constant Summary collapse

@@config =
nil

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
14
15
# File 'lib/bullet_train/configuration.rb', line 8

def initialize
  @@config = self

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

Instance Attribute Details

#enable_bulk_invitationsObject

Returns the value of attribute enable_bulk_invitations.



4
5
6
# File 'lib/bullet_train/configuration.rb', line 4

def enable_bulk_invitations
  @enable_bulk_invitations
end

#incoming_webhooks_parent_class_nameObject

Returns the value of attribute incoming_webhooks_parent_class_name.



4
5
6
# File 'lib/bullet_train/configuration.rb', line 4

def incoming_webhooks_parent_class_name
  @incoming_webhooks_parent_class_name
end

#strong_passwordsObject

Returns the value of attribute strong_passwords.



4
5
6
# File 'lib/bullet_train/configuration.rb', line 4

def strong_passwords
  @strong_passwords
end

Class Method Details

.enable_bulk_invitationsObject



22
23
24
# File 'lib/bullet_train/configuration.rb', line 22

def enable_bulk_invitations
  @@config&.enable_bulk_invitations
end

.incoming_webhooks_parent_class_nameObject



26
27
28
# File 'lib/bullet_train/configuration.rb', line 26

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

.strong_passwordsObject



18
19
20
# File 'lib/bullet_train/configuration.rb', line 18

def strong_passwords
  @@config&.strong_passwords
end