Class: SimpleSegment::Configuration
- Inherits:
-
Object
- Object
- SimpleSegment::Configuration
- Includes:
- Utils
- Defined in:
- lib/simple_segment/configuration.rb
Instance Attribute Summary collapse
-
#on_error ⇒ Object
readonly
Returns the value of attribute on_error.
-
#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 Utils
Constructor Details
#initialize(settings = {}) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 |
# File 'lib/simple_segment/configuration.rb', line 7 def initialize(settings = {}) symbolized_settings = symbolize_keys(settings) @write_key = symbolized_settings[:write_key] @on_error = symbolized_settings[:on_error] || proc {} raise ArgumentError, 'Missing required option :write_key' unless @write_key end |
Instance Attribute Details
#on_error ⇒ Object (readonly)
Returns the value of attribute on_error.
5 6 7 |
# File 'lib/simple_segment/configuration.rb', line 5 def on_error @on_error end |
#write_key ⇒ Object (readonly)
Returns the value of attribute write_key.
5 6 7 |
# File 'lib/simple_segment/configuration.rb', line 5 def write_key @write_key end |