Class: LaunchDarkly::Interfaces::Hooks::EvaluationSeriesContext

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/interfaces/hooks.rb

Overview

Contextual information that will be provided to handlers during evaluation series.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, context, default_value, method, environment_id = nil) ⇒ EvaluationSeriesContext

Returns a new instance of EvaluationSeriesContext.

Parameters:

  • key (String)
  • context (LaunchDarkly::LDContext)
  • default_value (any)
  • method (Symbol)
  • environment_id (String, nil) (defaults to: nil)


88
89
90
91
92
93
94
# File 'lib/ldclient-rb/interfaces/hooks.rb', line 88

def initialize(key, context, default_value, method, environment_id = nil)
  @key = key
  @context = context
  @default_value = default_value
  @method = method
  @environment_id = environment_id
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



69
70
71
# File 'lib/ldclient-rb/interfaces/hooks.rb', line 69

def context
  @context
end

#default_valueObject (readonly)

Returns the value of attribute default_value.



70
71
72
# File 'lib/ldclient-rb/interfaces/hooks.rb', line 70

def default_value
  @default_value
end

#environment_idString? (readonly)

The ID of the LaunchDarkly environment the SDK is connected to, if known. This is only available once the SDK has received data from LaunchDarkly.

Returns:

  • (String, nil)


79
80
81
# File 'lib/ldclient-rb/interfaces/hooks.rb', line 79

def environment_id
  @environment_id
end

#keyObject (readonly)

Returns the value of attribute key.



68
69
70
# File 'lib/ldclient-rb/interfaces/hooks.rb', line 68

def key
  @key
end

#methodObject (readonly)

Returns the value of attribute method.



71
72
73
# File 'lib/ldclient-rb/interfaces/hooks.rb', line 71

def method
  @method
end