123456789_123456789_123456789_123456789_123456789_

Class: Bundler::PubGrub::Package

Relationships & Source Files
Inherits: Object
Defined in: lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb

Constant Summary

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(name) ⇒ Package

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 8

def initialize(name)
  @name = name
end

Class Method Details

.root

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 23

def self.root
  ROOT
end

.root?(package) ⇒ Boolean

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 31

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

.root_version

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 27

def self.root_version
  ROOT_VERSION
end

Instance Attribute Details

#name (readonly)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 6

attr_reader :name

Instance Method Details

#<=>(other)

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 16

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

#inspect

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 12

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

#to_s

[ GitHub ]

  
# File 'lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb', line 39

def to_s
  name.to_s
end