Sha256: 2f64e32068011b0e97ca4a48dc81e8647a3142e8fe36f90fd1785aa5bdff7265
Contents?: true
Size: 700 Bytes
Versions: 13
Compression:
Stored size: 700 Bytes
Contents
class TestTrack::Assignment include TestTrack::RequiredOptions attr_accessor :context attr_reader :visitor, :split_name attr_writer :variant def initialize(opts = {}) @visitor = require_option!(opts, :visitor) @split_name = require_option!(opts, :split_name).to_s raise ArgumentError, "unknown opts: #{opts.keys.to_sentence}" if opts.present? end def variant @variant ||= _variant end def unsynced? true end def feature_gate? split_name.end_with?('_enabled') end private def _variant return if visitor.offline? variant = TestTrack::VariantCalculator.new(visitor: visitor, split_name: split_name).variant variant&.to_s end end
Version data entries
13 entries across 13 versions & 1 rubygems