Class: PostHog::Rails::InitConfig
- Inherits:
-
Object
- Object
- PostHog::Rails::InitConfig
- Defined in:
- lib/posthog/rails/railtie.rb
Overview
Configuration wrapper for the init block
Instance Method Summary collapse
-
#api_key=(value) ⇒ String
Core PostHog options.
- #before_send=(value) ⇒ Proc
- #feature_flag_request_timeout_seconds=(value) ⇒ Integer
- #feature_flags_polling_interval=(value) ⇒ Integer
- #host=(value) ⇒ String
-
#initialize(base_options = {}) ⇒ InitConfig
constructor
A new instance of InitConfig.
- #max_queue_size=(value) ⇒ Integer
- #on_error=(value) ⇒ Proc
- #personal_api_key=(value) ⇒ String?
- #sync_mode=(value) ⇒ Boolean
- #test_mode=(value) ⇒ Boolean
-
#to_client_options ⇒ Hash
Core SDK options suitable for Client.new.
Constructor Details
#initialize(base_options = {}) ⇒ InitConfig
Returns a new instance of InitConfig.
169 170 171 |
# File 'lib/posthog/rails/railtie.rb', line 169 def initialize( = {}) @base_options = end |
Instance Method Details
#api_key=(value) ⇒ String
Core PostHog options
177 178 179 |
# File 'lib/posthog/rails/railtie.rb', line 177 def api_key=(value) @base_options[:api_key] = value end |
#before_send=(value) ⇒ Proc
231 232 233 |
# File 'lib/posthog/rails/railtie.rb', line 231 def before_send=(value) @base_options[:before_send] = value end |
#feature_flag_request_timeout_seconds=(value) ⇒ Integer
225 226 227 |
# File 'lib/posthog/rails/railtie.rb', line 225 def feature_flag_request_timeout_seconds=(value) @base_options[:feature_flag_request_timeout_seconds] = value end |
#feature_flags_polling_interval=(value) ⇒ Integer
219 220 221 |
# File 'lib/posthog/rails/railtie.rb', line 219 def feature_flags_polling_interval=(value) @base_options[:feature_flags_polling_interval] = value end |
#host=(value) ⇒ String
189 190 191 |
# File 'lib/posthog/rails/railtie.rb', line 189 def host=(value) @base_options[:host] = value end |
#max_queue_size=(value) ⇒ Integer
195 196 197 |
# File 'lib/posthog/rails/railtie.rb', line 195 def max_queue_size=(value) @base_options[:max_queue_size] = value end |
#on_error=(value) ⇒ Proc
213 214 215 |
# File 'lib/posthog/rails/railtie.rb', line 213 def on_error=(value) @base_options[:on_error] = value end |
#personal_api_key=(value) ⇒ String?
183 184 185 |
# File 'lib/posthog/rails/railtie.rb', line 183 def personal_api_key=(value) @base_options[:personal_api_key] = value end |
#sync_mode=(value) ⇒ Boolean
207 208 209 |
# File 'lib/posthog/rails/railtie.rb', line 207 def sync_mode=(value) @base_options[:sync_mode] = value end |
#test_mode=(value) ⇒ Boolean
201 202 203 |
# File 'lib/posthog/rails/railtie.rb', line 201 def test_mode=(value) @base_options[:test_mode] = value end |
#to_client_options ⇒ Hash
Returns Core SDK options suitable for Client.new.
236 237 238 |
# File 'lib/posthog/rails/railtie.rb', line 236 def @base_options end |