Class: Conductor
- Inherits:
-
Object
show all
- Defined in:
- lib/conductor.rb,
lib/conductor/roll_up.rb,
lib/conductor/weights.rb,
lib/conductor/experiment.rb,
lib/conductor/controller/dashboard.rb
Defined Under Namespace
Modules: Controller
Classes: Experiment, RollUp, Weights
Constant Summary
collapse
- MAX_WEIGHTING_FACTOR =
1.25
- MINIMUM_LAUNCH_DAYS =
7
- DBG =
false
Class Method Summary
collapse
Class Method Details
.cache ⇒ Object
16
17
18
|
# File 'lib/conductor.rb', line 16
def self.cache
@@cache || Rails.cache
end
|
.identity ⇒ Object
25
26
27
|
# File 'lib/conductor.rb', line 25
def identity
return (@conductor_identity || ActiveSupport::SecureRandom.hex(16))
end
|
.identity=(value) ⇒ Object
21
22
23
|
# File 'lib/conductor.rb', line 21
def identity=(value)
@conductor_identity = value
end
|
.log(msg) ⇒ Object
29
30
31
|
# File 'lib/conductor.rb', line 29
def log(msg)
puts msg if DBG
end
|
.sanitize(str) ⇒ Object
33
34
35
|
# File 'lib/conductor.rb', line 33
def sanitize(str)
str.gsub(/\s/,'_').downcase
end
|