Class: Rack::RPC::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/rpc/middleware.rb

Overview

A Rack middleware base class.

Direct Known Subclasses

Endpoint

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Middleware) initialize(app, options = {})

Returns a new instance of Middleware

Parameters:

  • app (#call)
  • options (Hash) (defaults to: {})


14
15
16
# File 'lib/rack/rpc/middleware.rb', line 14

def initialize(app, options = {})
  @app, @options = app, options.dup
end

Instance Attribute Details

- (#call) app (readonly)

Returns:

  • (#call)


6
7
8
# File 'lib/rack/rpc/middleware.rb', line 6

def app
  @app
end

- (Hash) options (readonly)

Returns:

  • (Hash)


9
10
11
# File 'lib/rack/rpc/middleware.rb', line 9

def options
  @options
end

Instance Method Details

- (Array) call(env)

Parameters:

  • env (Hash)

Returns:

  • (Array)


21
22
23
# File 'lib/rack/rpc/middleware.rb', line 21

def call(env)
  @app.call(env)
end