Sha256: a1d17c1533afc913b14bc3e8db6c74b054b9fffa7ca7ae4c414f57246325ae53

Contents?: true

Size: 600 Bytes

Versions: 179

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

module Bundler::PubGrub
  class Package

    attr_reader :name

    def initialize(name)
      @name = name
    end

    def inspect
      "#<#{self.class} #{name.inspect}>"
    end

    def <=>(other)
      name <=> other.name
    end

    ROOT = Package.new(:root)
    ROOT_VERSION = 0

    def self.root
      ROOT
    end

    def self.root_version
      ROOT_VERSION
    end

    def self.root?(package)
      if package.respond_to?(:root?)
        package.root?
      else
        package == root
      end
    end

    def to_s
      name.to_s
    end
  end
end

Version data entries

179 entries across 179 versions & 5 rubygems

Version Path
rubygems-update-3.5.4 bundler/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
bundler-2.5.4 lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.80 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.79 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.78 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.77 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.76 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.75 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.74 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.73 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.72 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.71 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.70 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.69 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.68 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.67 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.66 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.65 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.64 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb
harbr-0.1.63 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb