Sha256: 8e125415d9f20ea521faf9cc0aa66d77175b1bdf05811505fe243886d00d0d26

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

module Domain
  module Comparisons

    def >(other)
      (x = (self <=> other)) && (x > 0)
    end

    def >=(other)
      (x = (self <=> other)) && (x >= 0)
    end

    def <(other)
      (x = (self <=> other)) && (x < 0)
    end

    def <=(other)
      (x = (self <=> other)) && (x <= 0)
    end

  end # module Comparisons
end # module Domain

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
domain-1.0.0 lib/domain/support/comparisons.rb
domain-1.0.0.rc4 lib/domain/support/comparisons.rb
domain-1.0.0.rc3 lib/domain/support/comparisons.rb