Class: SimpleSegment::Configuration

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/simple_segment/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#symbolize_keys

Constructor Details

#initialize(settings = {}) ⇒ Configuration

Returns a new instance of Configuration

Raises:

  • (ArgumentError)

7
8
9
10
11
# File 'lib/simple_segment/configuration.rb', line 7

def initialize(settings = {})
  symbolized_settings = symbolize_keys(settings)
  @write_key = symbolized_settings[:write_key]
  raise ArgumentError, 'Missing required option :write_key' unless @write_key
end

Instance Attribute Details

#write_keyObject (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