Class: OpenFeature::SDK::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/open_feature/sdk/client.rb

Overview

TODO: Write documentation

Constant Summary collapse

RESULT_TYPE =
%i[boolean string number integer float object].freeze
SUFFIXES =
%i[value details].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider:, domain: nil, evaluation_context: nil) ⇒ Client

Returns a new instance of Client.



15
16
17
18
19
20
# File 'lib/open_feature/sdk/client.rb', line 15

def initialize(provider:, domain: nil, evaluation_context: nil)
  @provider = provider
  @metadata = ClientMetadata.new(domain:)
  @evaluation_context = evaluation_context
  @hooks = []
end

Instance Attribute Details

#evaluation_contextObject (readonly)

Returns the value of attribute evaluation_context.



11
12
13
# File 'lib/open_feature/sdk/client.rb', line 11

def evaluation_context
  @evaluation_context
end

#hooksObject

Returns the value of attribute hooks.



13
14
15
# File 'lib/open_feature/sdk/client.rb', line 13

def hooks
  @hooks
end

#metadataObject (readonly)

Returns the value of attribute metadata.



11
12
13
# File 'lib/open_feature/sdk/client.rb', line 11

def 
  @metadata
end