Class: LaunchDarkly::Impl::EvalEvent Private

Inherits:
Event
  • Object
show all
Defined in:
lib/ldclient-rb/impl/event_types.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timestamp, context, key, version = nil, variation = nil, value = nil, reason = nil, default = nil, track_events = false, debug_until = nil, prereq_of = nil, sampling_ratio = nil, exclude_from_summaries = false, override_affected = false) ⇒ EvalEvent

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of EvalEvent.

Since:

  • 5.5.0



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/ldclient-rb/impl/event_types.rb', line 28

def initialize(timestamp, context, key, version = nil, variation = nil, value = nil, reason = nil, default = nil,
  track_events = false, debug_until = nil, prereq_of = nil, sampling_ratio = nil, exclude_from_summaries = false,
  override_affected = false)
  super(timestamp, context, sampling_ratio, exclude_from_summaries)
  @key = key
  @version = version
  @variation = variation
  @value = value
  @reason = reason
  @default = default
  # avoid setting rarely-used attributes if they have no value - this saves a little space per instance
  @track_events = track_events if track_events
  @debug_until = debug_until if debug_until
  @prereq_of = prereq_of if prereq_of
  @override_affected = true if override_affected
end

Instance Attribute Details

#debug_until ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



52
53
54
# File 'lib/ldclient-rb/impl/event_types.rb', line 52

def debug_until
  @debug_until
end

#default ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



50
51
52
# File 'lib/ldclient-rb/impl/event_types.rb', line 50

def default
  @default
end

#key ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



45
46
47
# File 'lib/ldclient-rb/impl/event_types.rb', line 45

def key
  @key
end

#prereq_of ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



53
54
55
# File 'lib/ldclient-rb/impl/event_types.rb', line 53

def prereq_of
  @prereq_of
end

#reason ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



49
50
51
# File 'lib/ldclient-rb/impl/event_types.rb', line 49

def reason
  @reason
end

#track_events ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



51
52
53
# File 'lib/ldclient-rb/impl/event_types.rb', line 51

def track_events
  @track_events
end

#value ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



48
49
50
# File 'lib/ldclient-rb/impl/event_types.rb', line 48

def value
  @value
end

#variation ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



47
48
49
# File 'lib/ldclient-rb/impl/event_types.rb', line 47

def variation
  @variation
end

#version ⇒ Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0



46
47
48
# File 'lib/ldclient-rb/impl/event_types.rb', line 46

def version
  @version
end

Instance Method Details

#override_affected ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

True if an override affected the evaluation, directly or through a prerequisite or segment. Such an evaluation appears only in the summary counters, under a counter that carries the override-affected marker. It produces no individual feature event and no debug event.

Returns:

  • (Boolean)

Since:

  • 5.5.0



59
60
61
# File 'lib/ldclient-rb/impl/event_types.rb', line 59

def override_affected
  @override_affected ? true : false
end