Class: AmplitudeExperiment::Evaluation::Distribution

Inherits:
Object
  • Object
show all
Defined in:
lib/experiment/evaluation/flag.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#rangeObject

Returns the value of attribute range.



8
9
10
# File 'lib/experiment/evaluation/flag.rb', line 8

def range
  @range
end

#variantObject

Returns the value of attribute variant.



8
9
10
# File 'lib/experiment/evaluation/flag.rb', line 8

def variant
  @variant
end

Class Method Details

.from_hash(hash) ⇒ Object



10
11
12
13
14
15
# File 'lib/experiment/evaluation/flag.rb', line 10

def self.from_hash(hash)
  new.tap do |dist|
    dist.variant = hash['variant']
    dist.range = hash['range']
  end
end