Class: Carbonyte::ApplicationInteractor

Inherits:
Object
  • Object
show all
Includes:
Interactor
Defined in:
app/interactors/carbonyte/application_interactor.rb

Overview

Carbonyte base class for all interactors

Direct Known Subclasses

Finders::ApplicationFinder

Class Method Summary collapse

Class Method Details

.inherited(klass) ⇒ Object

Interactor hooks are not inherited by subclasses, so we need a hack.



10
11
12
13
14
15
16
17
18
19
20
# File 'app/interactors/carbonyte/application_interactor.rb', line 10

def self.inherited(klass)
  klass.class_eval do
    before do
      context.current_interactor = self
    end

    after do
      context.current_interactor = nil
    end
  end
end