Sha256: 21ac11ce31eaf502794b01425f0c7529f92b14707cc68617ee1c8347ba5c2811
Contents?: true
Size: 691 Bytes
Versions: 1
Compression:
Stored size: 691 Bytes
Contents
require 'conductor/experiment' require 'conductor/roll_up' require 'conductor/weights' class Conductor MAX_WEIGHTING_FACTOR = 1.25 MINIMUM_LAUNCH_DAYS = 7 DBG = false @@VERSION = "0.1.0" @@MAJOR_VERSION = "1.0" cattr_reader :VERSION cattr_reader :MAJOR_VERSION cattr_writer :cache def self.cache @@cache || Rails.cache end class << self def identity=(value) @conductor_identity = value end def identity return (@conductor_identity || ActiveSupport::SecureRandom.hex(16)) end def log(msg) puts msg if DBG end end end class Array def sum_it(attribute) self.map {|x| x.send(attribute) }.compact.sum end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
conductor-0.2.9 | lib/conductor.rb |