Class: Sneakers::Middleware::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/sneakers/middleware/config.rb

Class Method Summary collapse

Class Method Details

.delete(klass) ⇒ Object



8
9
10
# File 'lib/sneakers/middleware/config.rb', line 8

def self.delete(klass)
  middlewares.reject! { |el| el[:class] == klass }
end

.to_aObject



12
13
14
# File 'lib/sneakers/middleware/config.rb', line 12

def self.to_a
  middlewares
end

.use(klass, args) ⇒ Object



4
5
6
# File 'lib/sneakers/middleware/config.rb', line 4

def self.use(klass, args)
  middlewares << { class: klass, args: args }
end