Sha256: 90bfcd248e56ce7c490ae11d79af13429454f71b534d56e259acf83f7b7083c1

Contents?: true

Size: 372 Bytes

Versions: 17

Compression:

Stored size: 372 Bytes

Contents

module Flipper
  module Api
    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|
          request.path_info =~ action_class.regex
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
flipper-api-0.15.0 lib/flipper/api/action_collection.rb
flipper-api-0.14.0 lib/flipper/api/action_collection.rb
flipper-api-0.13.0 lib/flipper/api/action_collection.rb
flipper-api-0.13.0.beta1 lib/flipper/api/action_collection.rb
flipper-api-0.12.2 lib/flipper/api/action_collection.rb
flipper-api-0.12.1 lib/flipper/api/action_collection.rb
flipper-api-0.12.0 lib/flipper/api/action_collection.rb
flipper-api-0.11.0 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.rc1 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta9 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta8 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta7 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta6 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta5 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta4 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta3 lib/flipper/api/action_collection.rb
flipper-api-0.11.0.beta1 lib/flipper/api/action_collection.rb