@@ -34,8 +34,9 @@ class Config
3434 # @option opts [Integer] :user_keys_capacity (1000) See {#user_keys_capacity}.
3535 # @option opts [Float] :user_keys_flush_interval (300) See {#user_keys_flush_interval}.
3636 # @option opts [Boolean] :inline_users_in_events (false) See {#inline_users_in_events}.
37- # @option opts [Object] :update_processor See {#update_processor}.
38- # @option opts [Object] :update_processor_factory See {#update_processor_factory}.
37+ # @option opts [Object] :data_source See {#data_source}.
38+ # @option opts [Object] :update_processor Obsolete synonym for `data_source`.
39+ # @option opts [Object] :update_processor_factory Obsolete synonym for `data_source`.
3940 #
4041 def initialize ( opts = { } )
4142 @base_uri = ( opts [ :base_uri ] || Config . default_base_uri ) . chomp ( "/" )
@@ -59,6 +60,7 @@ def initialize(opts = {})
5960 @user_keys_capacity = opts [ :user_keys_capacity ] || Config . default_user_keys_capacity
6061 @user_keys_flush_interval = opts [ :user_keys_flush_interval ] || Config . default_user_keys_flush_interval
6162 @inline_users_in_events = opts [ :inline_users_in_events ] || false
63+ @data_source = opts [ :data_source ] || opts [ :update_processor ] || opts [ :update_processor_factory ]
6264 @update_processor = opts [ :update_processor ]
6365 @update_processor_factory = opts [ :update_processor_factory ]
6466 end
@@ -245,22 +247,20 @@ def offline?
245247 # An object that is responsible for receiving feature flag data from LaunchDarkly. By default,
246248 # the client uses its standard polling or streaming implementation; this is customizable for
247249 # testing purposes.
248- # @return [LaunchDarkly::Interfaces::UpdateProcessor]
249- # @deprecated The preferred way to set this is now with {#update_processor_factory}.
250250 #
251- attr_reader :update_processor
252-
253- #
254- # Factory for an object that is responsible for receiving feature flag data from LaunchDarkly
255- # By default, the client uses its standard polling or streaming implementation; this is
256- # customizable for testing purposes.
257- #
258- # The factory is a lambda or Proc that takes two parameters: the SDK key and the {Config}. It
259- # must return an object that conforms to {LaunchDarkly::Interfaces::UpdateProcessor}.
251+ # This may be set to either an object that conforms to {LaunchDarkly::Interfaces::DataSource},
252+ # or a lambda (or Proc) that takes two parameters-- SDK key and {Config}-- and returns such an
253+ # object.
260254 #
261- # @return [lambda]
255+ # @return [LaunchDarkly::Interfaces::DataSource| lambda]
262256 # @see FileDataSource
263257 #
258+ attr_reader :data_source
259+
260+ # @deprecated This is replaced by {#data_source}.
261+ attr_reader :update_processor
262+
263+ # @deprecated This is replaced by {#data_source}.
264264 attr_reader :update_processor_factory
265265
266266 #
0 commit comments