method

validate_array_attribute

ruby latest stable - Class: Gem::SpecificationPolicy

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

validate_array_attribute(field)
private

No documentation available.

# File lib/rubygems/specification_policy.rb, line 281
  def validate_array_attribute(field)
    val = self.send(field)
    klass = case field
            when :dependencies then
              Gem::Dependency
            else
              String
            end

    unless Array === val and val.all? {|x| x.kind_of?(klass)}
      raise(Gem::InvalidSpecificationException,
            "#{field} must be an Array of #{klass}")
    end
  end