Sha256: daa1600c5509302e6f7163c0d7c5ec85f5f168197d05ceb45b7f44f7c14836f8

Contents?: true

Size: 210 Bytes

Versions: 4

Compression:

Stored size: 210 Bytes

Contents

module ActiveEnumerable
  module Comparable
    include ::Comparable

    def <=>(anOther)
      if anOther.is_a?(Array) || self.class == anOther.class
        to_a <=> anOther.to_a
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_enumerable-1.1.0 lib/active_enumerable/comparable.rb
active_enumerable-1.0.0 lib/active_enumerable/comparable.rb
active_enumerable-0.2.0 lib/active_enumerable/comparable.rb
active_enumerable-0.1.1 lib/active_enumerable/comparable.rb