Exception: LightrateRails::LightRateNoTokensAvailable

Inherits:
Error
  • Object
show all
Defined in:
lib/lightrate_rails/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path = nil, user_identifier = nil, response = nil) ⇒ LightRateNoTokensAvailable

Returns a new instance of LightRateNoTokensAvailable.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/lightrate_rails/errors.rb', line 11

def initialize(path = nil, user_identifier = nil, response = nil)
  @path = path
  @user_identifier = user_identifier
  @response = response
  
  message = "No tokens available for request"
  message += " to #{path}" if path
  message += " for user #{user_identifier}" if user_identifier
  
  super(message)
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/lightrate_rails/errors.rb', line 9

def path
  @path
end

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/lightrate_rails/errors.rb', line 9

def response
  @response
end

#user_identifierObject (readonly)

Returns the value of attribute user_identifier.



9
10
11
# File 'lib/lightrate_rails/errors.rb', line 9

def user_identifier
  @user_identifier
end