Class: AmplitudeExperiment::Evaluation::Allocation
- Inherits:
-
Object
- Object
- AmplitudeExperiment::Evaluation::Allocation
- Defined in:
- lib/experiment/evaluation/flag.rb
Instance Attribute Summary collapse
-
#distributions ⇒ Object
Returns the value of attribute distributions.
-
#range ⇒ Object
Returns the value of attribute range.
Class Method Summary collapse
Instance Attribute Details
#distributions ⇒ Object
Returns the value of attribute distributions.
19 20 21 |
# File 'lib/experiment/evaluation/flag.rb', line 19 def distributions @distributions end |
#range ⇒ Object
Returns the value of attribute range.
19 20 21 |
# File 'lib/experiment/evaluation/flag.rb', line 19 def range @range end |
Class Method Details
.from_hash(hash) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/experiment/evaluation/flag.rb', line 21 def self.from_hash(hash) new.tap do |alloc| alloc.range = hash['range'] alloc.distributions = hash['distributions']&.map { |d| Distribution.from_hash(d) } end end |