Sha256: a83947ccb4fe0f234dde50496a7972d700207ca0796a53d0d3e48f5df305df53

Contents?: true

Size: 420 Bytes

Versions: 6

Compression:

Stored size: 420 Bytes

Contents

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

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

      def self.to_a
        middlewares
      end

      def self.middlewares
        @middlewares ||= []
      end

      private_class_method :middlewares
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
kicks-3.1.1 lib/sneakers/middleware/config.rb
kicks-3.1.0 lib/sneakers/middleware/config.rb
kicks-3.0.0 lib/sneakers/middleware/config.rb
kicks-3.0.0.pre lib/sneakers/middleware/config.rb
sneakers-2.12.0 lib/sneakers/middleware/config.rb
sneakers-2.12.0.rc1 lib/sneakers/middleware/config.rb