diff --git a/lib/ldclient-openfeature/provider.rb b/lib/ldclient-openfeature/provider.rb index 43c4507..c924f92 100644 --- a/lib/ldclient-openfeature/provider.rb +++ b/lib/ldclient-openfeature/provider.rb @@ -8,6 +8,11 @@ module OpenFeature class Provider attr_reader :metadata + # + # @return client [LaunchDarkly::LDClient] + # + attr_reader :client + NUMERIC_TYPES = %i[integer float number].freeze private_constant :NUMERIC_TYPES diff --git a/spec/provider_spec.rb b/spec/provider_spec.rb index b41a283..3cf92b6 100644 --- a/spec/provider_spec.rb +++ b/spec/provider_spec.rb @@ -14,6 +14,10 @@ expect(provider.metadata.name).to eq("launchdarkly-openfeature-server") end + it "exposes the underlying LaunchDarkly client" do + expect(provider.client).to be_a LaunchDarkly::LDClient + end + it "not providing context returns error" do resolution_details = provider.fetch_boolean_value(flag_key: "flag-key", default_value: true)