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-0.26.0 lib/flipper/api/action_collection.rb
flipper-api-0.26.0.rc2 lib/flipper/api/action_collection.rb
flipper-api-0.26.0.rc1 lib/flipper/api/action_collection.rb
flipper-api-0.25.4 lib/flipper/api/action_collection.rb
flipper-api-0.25.3 lib/flipper/api/action_collection.rb
flipper-api-0.25.2 lib/flipper/api/action_collection.rb
flipper-api-0.25.1 lib/flipper/api/action_collection.rb
flipper-api-0.25.0 lib/flipper/api/action_collection.rb
flipper-api-0.24.1 lib/flipper/api/action_collection.rb
flipper-api-0.24.0 lib/flipper/api/action_collection.rb
flipper-api-0.23.1 lib/flipper/api/action_collection.rb
flipper-api-0.23.0 lib/flipper/api/action_collection.rb
flipper-api-0.22.2 lib/flipper/api/action_collection.rb
flipper-api-0.22.1 lib/flipper/api/action_collection.rb
flipper-api-0.22.0 lib/flipper/api/action_collection.rb
flipper-api-0.21.0 lib/flipper/api/action_collection.rb
flipper-api-0.21.0.rc2 lib/flipper/api/action_collection.rb
flipper-api-0.21.0.rc1 lib/flipper/api/action_collection.rb
flipper-api-0.20.4 lib/flipper/api/action_collection.rb
flipper-api-0.20.3 lib/flipper/api/action_collection.rb