Class: Variant

Inherits:
Struct
  • Object
show all
Defined in:
lib/ab/variant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accumulated_chance_weightObject

Returns the value of attribute accumulated_chance_weight

Returns:

  • (Object)

    the current value of accumulated_chance_weight



1
2
3
# File 'lib/ab/variant.rb', line 1

def accumulated_chance_weight
  @accumulated_chance_weight
end

#hashObject

Returns the value of attribute hash

Returns:

  • (Object)

    the current value of hash



1
2
3
# File 'lib/ab/variant.rb', line 1

def hash
  @hash
end

Instance Method Details

#chance_weightObject



2
3
4
# File 'lib/ab/variant.rb', line 2

def chance_weight
  hash['chance_weight']
end

#nameObject



6
7
8
# File 'lib/ab/variant.rb', line 6

def name
  hash['name']
end