Class: RudderAnalyticsSync::Configuration
- Inherits:
-
Object
- Object
- RudderAnalyticsSync::Configuration
- Defined in:
- lib/rudder_analytics_sync/configuration.rb
Constant Summary
Constants included from Utils
Utils::UTC_OFFSET_WITHOUT_COLON, Utils::UTC_OFFSET_WITH_COLON
Instance Attribute Summary collapse
-
#data_plane_url ⇒ Object
readonly
Returns the value of attribute data_plane_url.
-
#gzip ⇒ Object
readonly
Returns the value of attribute gzip.
-
#http_options ⇒ Object
readonly
Returns the value of attribute http_options.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#on_error ⇒ Object
readonly
Returns the value of attribute on_error.
-
#stub ⇒ Object
readonly
Returns the value of attribute stub.
-
#write_key ⇒ Object
readonly
Returns the value of attribute write_key.
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from Logging
Methods included from Utils
#date_in_iso8601, #formatted_offset, included, #isoify_dates, #isoify_dates!, #maybe_datetime_in_iso8601, #seconds_to_utc_offset, #symbolize_keys, #time_in_iso8601, #uid, #valid_date?
Constructor Details
#initialize(settings = {}) ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 11 def initialize(settings = {}) symbolized_settings = symbolize_keys(settings) @write_key = symbolized_settings[:write_key] @data_plane_url = symbolized_settings[:data_plane_url] @on_error = symbolized_settings[:on_error] || proc {} @stub = symbolized_settings[:stub] @logger = default_logger(symbolized_settings[:logger]) @http_options = { use_ssl: true } .merge(symbolized_settings[:http_options] || {}) @gzip = symbolized_settings[:gzip] raise ArgumentError, 'Missing required option :write_key' \ unless @write_key end |
Instance Attribute Details
#data_plane_url ⇒ Object (readonly)
Returns the value of attribute data_plane_url.
9 10 11 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 9 def data_plane_url @data_plane_url end |
#gzip ⇒ Object (readonly)
Returns the value of attribute gzip.
9 10 11 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 9 def gzip @gzip end |
#http_options ⇒ Object (readonly)
Returns the value of attribute http_options.
9 10 11 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 9 def @http_options end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
9 10 11 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 9 def logger @logger end |
#on_error ⇒ Object (readonly)
Returns the value of attribute on_error.
9 10 11 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 9 def on_error @on_error end |
#stub ⇒ Object (readonly)
Returns the value of attribute stub.
9 10 11 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 9 def stub @stub end |
#write_key ⇒ Object (readonly)
Returns the value of attribute write_key.
9 10 11 |
# File 'lib/rudder_analytics_sync/configuration.rb', line 9 def write_key @write_key end |