Sha256: a2c1c1367db7170c6bcf87effe4aa6d3566a60e784f69a875e4747d1a0582a43

Contents?: true

Size: 1.88 KB

Versions: 16

Compression:

Stored size: 1.88 KB

Contents

class ConfigBuilder

  def build

    @config
  end

  def initialize

    @config = Config.new
    @config.cache = DefaultCache.new(@config.logger)
  end

  def config_url(config_url)

    @config.config_url = config_url
    self
  end

  def event_url(event_url)

    @config.event_url = event_url
    self
  end

  def stream_enabled(stream_enabled)

    @config.stream_enabled = stream_enabled
    self
  end

  def poll_interval_in_seconds(poll_interval_in_seconds)

    @config.poll_interval_in_seconds = poll_interval_in_seconds
    self
  end

  def analytics_enabled(analytics_enabled)

    @config.analytics_enabled = analytics_enabled
    self
  end

  def frequency(frequency)

    @config.frequency = frequency
    self
  end

  def buffer_size(buffer_size)

    @config.buffer_size = buffer_size
    self
  end

  def all_attributes_private(all_attributes_private)

    @config.all_attributes_private = all_attributes_private
    self
  end

  def private_attributes(private_attributes)

    @config.private_attributes = private_attributes
    self
  end

  def connection_timeout(connection_timeout)

    @config.connection_timeout = connection_timeout
    self
  end

  def read_timeout(read_timeout)

    @config.read_timeout = read_timeout
    self
  end

  def write_timeout(write_timeout)

    @config.write_timeout = write_timeout
    self
  end

  def tls_ca_cert(cert_file)
    @config.ssl_ca_cert = cert_file
    self
  end

  def logger(logger)

    @config.logger = logger
    @config.cache.logger = logger
    self
  end

  def debugging(debug)

    @config.debugging = debug
    self
  end

  def metrics_service_acceptable_duration(metrics_service_acceptable_duration)

    @config.metrics_service_acceptable_duration = metrics_service_acceptable_duration
    self
  end

  def cache(cache)

    @config.cache = cache
    self
  end

  def store(store)

    @config.store = store
    self
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ff-ruby-server-sdk-1.4.6 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.4.5 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.4.4 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.4.3 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.4.2 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.4.1 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.4.0 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.3.2 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.3.1 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.2.1 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.2.0 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.1.4 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.1.3 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.1.2 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.1.1 lib/ff/ruby/server/sdk/api/config_builder.rb
ff-ruby-server-sdk-1.1.0 lib/ff/ruby/server/sdk/api/config_builder.rb