Exception: Optimizely::InvalidAttributeError

Inherits:
Error
  • Object
show all
Defined in:
lib/optimizely/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute_key) ⇒ InvalidAttributeError

Returns a new instance of InvalidAttributeError.

Raises:

  • (ArgumentError)


61
62
63
64
65
66
67
# File 'lib/optimizely/exceptions.rb', line 61

def initialize(attribute_key)
  raise ArgumentError, 'attribute_key must be provided' if attribute_key.nil?

  super("Attribute key '#{attribute_key}' is not in datafile.")

  @attribute_key = attribute_key
end

Instance Attribute Details

#attribute_keyObject (readonly)

Raised when an invalid attribute is provided



59
60
61
# File 'lib/optimizely/exceptions.rb', line 59

def attribute_key
  @attribute_key
end