Sha256: 65c9c23f1622a00cfe2dd1495ce96dd300cbef7f1229b2fccc95f6d34ee8ad52

Contents?: true

Size: 393 Bytes

Versions: 13

Compression:

Stored size: 393 Bytes

Contents

# encoding: utf-8
module Middleman
  module Presentation
    # Included if class can be compared by name
    module ComparableByName
      include Comparable

      # @private
      def hash
        name.hash
      end

      # @private
      def eql?(other)
        name.eql? other.name
      end

      # @private
      def <=>(other)
        name <=> other.name
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
middleman-presentation-core-0.17.7 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.17.6 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.17.5 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.17.2 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.17.1 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.17.0 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.16.3 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.16.2 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.16.0 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.16.0.rc2 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.16.0.rc1 lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.16.0.beta lib/middleman-presentation-core/roles/comparable_by_name.rb
middleman-presentation-core-0.16.0.alpha lib/middleman-presentation-core/roles/comparable_by_name.rb