Sha256: 585bd727b2593b95da5347f870d7af8ef4e040d39d2c41c0b443c6ff6594b26a

Contents?: true

Size: 391 Bytes

Versions: 58

Compression:

Stored size: 391 Bytes

Contents

# encoding: utf-8
module FeduxOrgStdlib
  module Roles
    # 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

58 entries across 58 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.10.6 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.10.5 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.10.4 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.10.3 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.10.2 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.10.1 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.10.0 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.8 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.7 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.6 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.5 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.4 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.2 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.1 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.9.0 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.8.11 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.8.10 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.8.9 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.8.8 lib/fedux_org_stdlib/roles/comparable_by_name.rb
fedux_org-stdlib-0.8.7 lib/fedux_org_stdlib/roles/comparable_by_name.rb