Class: AmplitudeExperiment::Evaluation::Bucket
- Inherits:
-
Object
- Object
- AmplitudeExperiment::Evaluation::Bucket
- Defined in:
- lib/experiment/evaluation/flag.rb
Instance Attribute Summary collapse
-
#allocations ⇒ Object
Returns the value of attribute allocations.
-
#salt ⇒ Object
Returns the value of attribute salt.
-
#selector ⇒ Object
Returns the value of attribute selector.
Class Method Summary collapse
Instance Attribute Details
#allocations ⇒ Object
Returns the value of attribute allocations.
42 43 44 |
# File 'lib/experiment/evaluation/flag.rb', line 42 def allocations @allocations end |
#salt ⇒ Object
Returns the value of attribute salt.
42 43 44 |
# File 'lib/experiment/evaluation/flag.rb', line 42 def salt @salt end |
#selector ⇒ Object
Returns the value of attribute selector.
42 43 44 |
# File 'lib/experiment/evaluation/flag.rb', line 42 def selector @selector end |
Class Method Details
.from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/experiment/evaluation/flag.rb', line 44 def self.from_hash(hash) new.tap do |bucket| bucket.selector = hash['selector'] bucket.salt = hash['salt'] bucket.allocations = hash['allocations']&.map { |a| Allocation.from_hash(a) } end end |