Sha256: 8299d28195df8245c145a779a8940e11c351ff42fdba23f0ecdc20777bffd7ef

Contents?: true

Size: 1.57 KB

Versions: 4

Compression:

Stored size: 1.57 KB

Contents

# encoding: utf-8

module Veritas
  class Function
    class Predicate

      # A predicate representing a greater than or equal to test between operands
      class GreaterThanOrEqualTo < Predicate
        include Comparable

        # Return the GreaterThanOrEqualTo operation
        #
        # @example
        #   GreaterThanOrEqualTo.operation  # => :>=
        #
        # @return [Symbol]
        #
        # @api public
        def self.operation
          :>=
        end

        # Return the inverse predicate class
        #
        # @example
        #   GreaterThanOrEqualTo.inverse  # => LessThan
        #
        # @return [Class<LessThan>]
        #
        # @api public
        def self.inverse
          LessThan
        end

        # Return the reverse predicate class
        #
        # @example
        #   GreaterThanOrEqualTo.reverse  # => LessThanOrEqualTo
        #
        # @return [Class<LessThanOrEqualTo>]
        #
        # @api public
        def self.reverse
          LessThanOrEqualTo
        end

        module Methods

          # Compare the left to see if it is greater than or equal to the right
          #
          # @example
          #   greater_than_or_equal_to = expression.gte(other)
          #
          # @param [Function] other
          #
          # @return [GreaterThanOrEqualTo]
          #
          # @api public
          def gte(other)
            GreaterThanOrEqualTo.new(self, other)
          end

        end # module Methods
      end # class GreaterThanOrEqualTo
    end # class Predicate
  end # class Function
end # module Veritas

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-0.0.7 lib/veritas/function/predicate/greater_than_or_equal_to.rb
veritas-0.0.6 lib/veritas/function/predicate/greater_than_or_equal_to.rb
veritas-0.0.5 lib/veritas/function/predicate/greater_than_or_equal_to.rb
veritas-0.0.4 lib/veritas/function/predicate/greater_than_or_equal_to.rb