Class: Proscenium::Middleware::Base

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Benchmarkable
Defined in:
lib/proscenium/middleware/base.rb

Direct Known Subclasses

Esbuild

Defined Under Namespace

Classes: CompileError

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ Base

Returns a new instance of Base.



26
27
28
# File 'lib/proscenium/middleware/base.rb', line 26

def initialize(request)
  @request = request
end

Class Method Details

.attempt(request) ⇒ Object



22
23
24
# File 'lib/proscenium/middleware/base.rb', line 22

def self.attempt(request)
  new(request).renderable!&.attempt
end

Instance Method Details

#renderable!Object



30
31
32
# File 'lib/proscenium/middleware/base.rb', line 30

def renderable!
  renderable? ? self : nil
end