Exception: Optimizely::InvalidAudienceError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(audience_id) ⇒ InvalidAudienceError

Returns a new instance of InvalidAudienceError.

Raises:

  • (ArgumentError)


47
48
49
50
51
52
53
# File 'lib/optimizely/exceptions.rb', line 47

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

  super("Audience id '#{audience_id}' is not in datafile.")

  @audience_id = audience_id
end

Instance Attribute Details

#audience_idObject (readonly)

Raised when an invalid audience is provided



45
46
47
# File 'lib/optimizely/exceptions.rb', line 45

def audience_id
  @audience_id
end