Sha256: 85864a0b2280fbed9d52029b9e33678fa09c51e38e4c792448d0d7f77726b3ed

Contents?: true

Size: 458 Bytes

Versions: 54

Compression:

Stored size: 458 Bytes

Contents

module Flipper
  module Api
    # Internal: Used to detect the action that should be used in the middleware.
    class ActionCollection
      def initialize
        @action_classes = []
      end

      def add(action_class)
        @action_classes << action_class
      end

      def action_for_request(request)
        @action_classes.detect do |action_class|
          action_class.route_match?(request.path_info)
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
flipper-api-1.3.2 lib/flipper/api/action_collection.rb
flipper-api-1.3.1 lib/flipper/api/action_collection.rb
flipper-api-1.3.0 lib/flipper/api/action_collection.rb
flipper-api-1.3.0.pre lib/flipper/api/action_collection.rb
flipper-api-1.2.2 lib/flipper/api/action_collection.rb
flipper-api-1.2.1 lib/flipper/api/action_collection.rb
flipper-api-1.2.0 lib/flipper/api/action_collection.rb
flipper-api-1.1.2 lib/flipper/api/action_collection.rb
flipper-api-1.1.1 lib/flipper/api/action_collection.rb
flipper-api-1.1.0 lib/flipper/api/action_collection.rb
flipper-api-1.0.0 lib/flipper/api/action_collection.rb
flipper-api-1.0.0.pre lib/flipper/api/action_collection.rb
flipper-api-0.28.3 lib/flipper/api/action_collection.rb
flipper-api-0.28.2 lib/flipper/api/action_collection.rb
flipper-api-0.28.1 lib/flipper/api/action_collection.rb
flipper-api-0.28.0 lib/flipper/api/action_collection.rb
flipper-api-0.27.1 lib/flipper/api/action_collection.rb
flipper-api-0.27.0 lib/flipper/api/action_collection.rb
flipper-api-0.26.2 lib/flipper/api/action_collection.rb
flipper-api-0.26.1 lib/flipper/api/action_collection.rb