Exception: ActiveInteractor::Error::InvalidContextClass

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_interactor/error.rb

Overview

Raised when an invalid context class is assigned to an interactor.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(class_name = nil) ⇒ InvalidContextClass

Returns a new instance of InvalidContextClass.

Since:

  • 1.0.0



40
41
42
43
# File 'lib/active_interactor/error.rb', line 40

def initialize(class_name = nil)
  @class_name = class_name
  super("invalid context class #{class_name}")
end

Instance Attribute Details

#class_nameString|nil (readonly)

The class name of the context used for debugging.

Returns:

  • (String|nil)

    the class name of the context

Since:

  • 1.0.0



37
38
39
40
41
42
43
44
# File 'lib/active_interactor/error.rb', line 37

class InvalidContextClass < StandardError
  attr_reader :class_name

  def initialize(class_name = nil)
    @class_name = class_name
    super("invalid context class #{class_name}")
  end
end