Class: Textus::Dispatch::Middleware::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/textus/dispatch/middleware/base.rb

Direct Known Subclasses

AuditIndex, Auth, Binder, Cascade

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(subclass) ⇒ Object



5
6
7
8
# File 'lib/textus/dispatch/middleware/base.rb', line 5

def self.inherited(subclass)
  super
  subclass.instance_variable_set(:@middleware_name, nil)
end

.middleware_name(name = nil) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/textus/dispatch/middleware/base.rb', line 11

def middleware_name(name = nil)
  if name
    @middleware_name = name.to_s
  else
    @middleware_name || name.split("::").last.downcase
  end
end

Instance Method Details

#call(container:, command:, call:, next_handler:) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/textus/dispatch/middleware/base.rb', line 20

def call(container:, command:, call:, next_handler:)
  raise NotImplementedError
end