Sha256: 7f5e2580145cfe643325f9a6d59c4ca27104da844f6b7f23ff1dfabe1db77988

Contents?: true

Size: 290 Bytes

Versions: 10

Compression:

Stored size: 290 Bytes

Contents

module Flipper
  module Expressions
    class Comparable
      def self.operator
        raise NotImplementedError
      end

      def self.call(left, right)
        left.respond_to?(operator) && right.respond_to?(operator) && left.public_send(operator, right)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flipper-1.3.2 lib/flipper/expressions/comparable.rb
flipper-1.3.1 lib/flipper/expressions/comparable.rb
flipper-1.3.0 lib/flipper/expressions/comparable.rb
flipper-1.3.0.pre lib/flipper/expressions/comparable.rb
flipper-1.2.2 lib/flipper/expressions/comparable.rb
flipper-1.2.1 lib/flipper/expressions/comparable.rb
flipper-1.2.0 lib/flipper/expressions/comparable.rb
flipper-1.1.2 lib/flipper/expressions/comparable.rb
flipper-1.1.1 lib/flipper/expressions/comparable.rb
flipper-1.1.0 lib/flipper/expressions/comparable.rb