Class: Algolia::Analytics::Config

Inherits:
BaseConfig show all
Defined in:
lib/algolia/config/analytics_config.rb

Instance Attribute Summary collapse

Attributes inherited from BaseConfig

#api_key, #app_id, #batch_size, #compression_type, #connect_timeout, #headers, #read_timeout, #symbolize_keys, #use_latest_settings, #write_timeout

Instance Method Summary collapse

Methods inherited from BaseConfig

#set_extra_header

Constructor Details

#initialize(opts = {}) ⇒ Config

Initialize a config

Parameters:

  • options (Hash)

    a customizable set of options



12
13
14
15
16
17
# File 'lib/algolia/config/analytics_config.rb', line 12

def initialize(opts = {})
  super(opts)

  @region        = opts[:region] || 'us'
  @default_hosts = [Transport::StatefulHost.new("analytics.#{region}.algolia.com")]
end

Instance Attribute Details

#default_hostsObject

Returns the value of attribute default_hosts.



4
5
6
# File 'lib/algolia/config/analytics_config.rb', line 4

def default_hosts
  @default_hosts
end

#regionObject

Returns the value of attribute region.



4
5
6
# File 'lib/algolia/config/analytics_config.rb', line 4

def region
  @region
end