Sha256: a58a2f947ce209de252893c3da50898f0713090de73c12f7bcb128062e7b6308

Contents?: true

Size: 321 Bytes

Versions: 2

Compression:

Stored size: 321 Bytes

Contents

module Seory
  module Condition
    class Params
      def self.supposable?(condition_object)
        condition_object.is_a?(Hash)
      end

      def initialize(params)
        @params = params
      end

      def match?(controller)
        @params.all? {|k, v| controller.params[k] == v }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
seory-0.2.0 lib/seory/condition/params.rb
seory-0.1.0 lib/seory/condition/params.rb