Class: Pairer::Config
- Inherits:
-
Object
- Object
- Pairer::Config
- Defined in:
- lib/pairer/config.rb
Constant Summary collapse
- @@allowed_org_ids =
[]
- @@hash_id_salt =
true
- @@max_iterations_to_track =
100
Class Method Summary collapse
- .allowed_org_ids=(val) ⇒ Object
- .hash_id_salt=(val) ⇒ Object
- .max_iterations_to_track=(val) ⇒ Object
Class Method Details
.allowed_org_ids=(val) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/pairer/config.rb', line 7 def self.allowed_org_ids=(val) if val.is_a?(Array) @@allowed_org_ids = val.collect(&:presence).compact else raise "Must be an array" end end |
.hash_id_salt=(val) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/pairer/config.rb', line 18 def self.hash_id_salt=(val) if val.is_a?(String) @@hash_id_salt = val else raise ArgumentError.new("hash_id_salt must be String") end end |
.max_iterations_to_track=(val) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/pairer/config.rb', line 29 def self.max_iterations_to_track=(val) if val.is_a?(Integer) && val >= 1 @@max_iterations_to_track = val else raise "Must be a positive integer" end end |