Sha256: 97aee9439140387af1307361982bd822c296f814563cb63c57985a7bd8ac8292

Contents?: true

Size: 764 Bytes

Versions: 10

Compression:

Stored size: 764 Bytes

Contents

require_relative "metrics_processor"
require_relative "flag_evaluate_callback"

class InnerClientFlagEvaluateCallback < FlagEvaluateCallback

  def initialize(metrics_processor, logger = nil)

    unless metrics_processor.kind_of?(MetricsProcessor)

      raise "The 'metrics_processor' parameter must be of '" + MetricsProcessor.to_s + "' data type"
    end

    if logger != nil

      @logger = logger
    else

      @logger = Logger.new(STDOUT)
    end

    @metrics_processor = metrics_processor
  end

  def process_evaluation(feature_config, target, variation)

    @logger.debug "Processing evaluation: " + feature_config.feature.to_s + ", " + target.identifier.to_s

    @metrics_processor.register_evaluation(target, feature_config, variation)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ff-ruby-server-sdk-1.4.0 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.3.2 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.3.1 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.2.1 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.2.0 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.1.4 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.1.3 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.1.2 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.1.1 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb
ff-ruby-server-sdk-1.1.0 lib/ff/ruby/server/sdk/api/inner_client_flag_evaluate_callback.rb