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

#initialize(app, options = {}) ⇒ Middleware

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

#app#call (readonly)

Returns:



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

def app
  @app
end

#optionsHash (readonly)

Returns:

  • (Hash)


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

def options
  @options
end

Instance Method Details

#call(env) ⇒ Array

Parameters:

  • env (Hash)

Returns:

  • (Array)


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

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