Class: Cloudtasker::Middleware::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudtasker/middleware/chain.rb

Overview

Middleware list item.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, *args) ⇒ Entry

Build a new entry.

Parameters:

  • klass (Class)

    The middleware class.

  • *args (Array<any>)

    The list of arguments for the middleware.



235
236
237
238
# File 'lib/cloudtasker/middleware/chain.rb', line 235

def initialize(klass, *args)
  @klass = klass
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



227
228
229
# File 'lib/cloudtasker/middleware/chain.rb', line 227

def args
  @args
end

#klassObject (readonly)

Returns the value of attribute klass.



227
228
229
# File 'lib/cloudtasker/middleware/chain.rb', line 227

def klass
  @klass
end

Instance Method Details

#make_newAny

Return an instantiated middleware.

Returns:

  • (Any)

    The instantiated middleware.



245
246
247
# File 'lib/cloudtasker/middleware/chain.rb', line 245

def make_new
  @klass.new(*@args)
end