Class: AmplitudeExperiment::Evaluation::Condition

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#opObject

Returns the value of attribute op.



30
31
32
# File 'lib/experiment/evaluation/flag.rb', line 30

def op
  @op
end

#selectorObject

Returns the value of attribute selector.



30
31
32
# File 'lib/experiment/evaluation/flag.rb', line 30

def selector
  @selector
end

#valuesObject

Returns the value of attribute values.



30
31
32
# File 'lib/experiment/evaluation/flag.rb', line 30

def values
  @values
end

Class Method Details

.from_hash(hash) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/experiment/evaluation/flag.rb', line 32

def self.from_hash(hash)
  new.tap do |cond|
    cond.selector = hash['selector']
    cond.op = hash['op']
    cond.values = hash['values']
  end
end