method

<<

Importance_0
v2_1_10 - Show latest stable - 0 notes - Class: AvailableSet
<<(o) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/available_set.rb, line 23
  def <<(o)
    case o
    when Gem::AvailableSet
      s = o.set
    when Array
      s = o.map do |sp,so|
        if !sp.kind_of?(Gem::Specification) or !so.kind_of?(Gem::Source)
          raise TypeError, "Array must be in [[spec, source], ...] form"
        end

        Tuple.new(sp,so)
      end
    else
      raise TypeError, "must be a Gem::AvailableSet"
    end

    @set += s
    @sorted = nil

    self
  end
Register or log in to add new notes.