method

fetch_size

Importance_0
v2_2_9 - Show latest stable - 0 notes - Class: FakeFetcher
fetch_size(path) public

No documentation

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

Hide source
# File lib/rubygems/test_utilities.rb, line 124
  def fetch_size(path)
    path = path.to_s
    @paths << path

    raise ArgumentError, 'need full URI' unless path =~ %^http://'

    unless @data.key? path then
      raise Gem::RemoteFetcher::FetchError.new("no data for #{path}", path)
    end

    data = @data[path]

    data.respond_to?(:call) ? data.call : data.length
  end
Register or log in to add new notes.