class Bundler::Checksum::Source

def ==(other)

def ==(other)
  other.is_a?(self.class) && other.type == type && other.location == location
end

def initialize(type, location)

def initialize(type, location)
  @type = type
  @location = location
end

def removable?

def removable?
  type == :lock || type == :gem
end

def removal

A full sentence describing how to remove the checksum
def removal
  case type
  when :lock
    "remove the matching checksum in #{location}"
  when :gem
    "remove the gem at #{location}"
  when :api
    "checksums from #{location} cannot be locally modified, you may need to update your sources"
  else
    "remove #{location} (#{type})"
  end
end

def to_s

rake (10.3.2) sha256=abc123 from #{to_s}
phrased so that the usual string format is grammatically correct
def to_s
  case type
  when :lock
    "the lockfile CHECKSUMS at #{location}"
  when :gem
    "the gem at #{location}"
  when :api
    "the API at #{location}"
  else
    "#{location} (#{type})"
  end
end