Class: Jackhammer::MiddlewareCollection::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/jackhammer/middleware_collection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



21
22
23
# File 'lib/jackhammer/middleware_collection.rb', line 21

def args
  @args
end

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



21
22
23
# File 'lib/jackhammer/middleware_collection.rb', line 21

def block
  @block
end

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of klass



21
22
23
# File 'lib/jackhammer/middleware_collection.rb', line 21

def klass
  @klass
end

#kwargsObject

Returns the value of attribute kwargs

Returns:

  • (Object)

    the current value of kwargs



21
22
23
# File 'lib/jackhammer/middleware_collection.rb', line 21

def kwargs
  @kwargs
end

Instance Method Details

#instantiateObject



22
23
24
25
26
# File 'lib/jackhammer/middleware_collection.rb', line 22

def instantiate
  return klass unless klass.respond_to?(:new)

  klass.new(*args, **kwargs, &block)
end