Class: Toys::Middleware::Spec

Inherits:
Object
  • Object
show all
Defined in:
core-docs/toys/middleware.rb

Overview

Defined in the toys-core gem

A middleware specification, including the middleware class and the arguments to pass to the constructor.

Use spec to create a middleware spec.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsArray? (readonly)



191
192
193
# File 'core-docs/toys/middleware.rb', line 191

def args
  @args
end

#blockProc? (readonly)



206
207
208
# File 'core-docs/toys/middleware.rb', line 206

def block
  @block
end

#kwargsHash? (readonly)



198
199
200
# File 'core-docs/toys/middleware.rb', line 198

def kwargs
  @kwargs
end

#nameString, ... (readonly)



183
184
185
# File 'core-docs/toys/middleware.rb', line 183

def name
  @name
end

#objectToys::Middleware? (readonly)



176
177
178
# File 'core-docs/toys/middleware.rb', line 176

def object
  @object
end

Instance Method Details

#==(other) ⇒ Boolean Also known as: eql?

Equality check



214
215
216
# File 'core-docs/toys/middleware.rb', line 214

def ==(other)
  # Source available in the toys-core gem
end

#build(lookup) ⇒ Toys::Middleware

Builds a middleware for this spec, given a ModuleLookup for middleware.

If this spec wraps an existing middleware object, returns that object. Otherwise, constructs a middleware object from the spec.



168
169
170
# File 'core-docs/toys/middleware.rb', line 168

def build(lookup)
  # Source available in the toys-core gem
end

#hashInteger

Return the hash code



224
225
226
# File 'core-docs/toys/middleware.rb', line 224

def hash
  # Source available in the toys-core gem
end