In Files

  • rubygems/source_specific_file.rb

Class/Module Index [+]

Quicksearch

Gem::Source::SpecificFile

Attributes

spec[R]

Public Class Methods

new(file) click to toggle source
 
               # File rubygems/source_specific_file.rb, line 2
def initialize(file)
  @uri = nil
  @path = ::File.expand_path(file)

  @package = Gem::Package.new @path
  @spec = @package.spec
  @name = @spec.name_tuple
end
            

Public Instance Methods

download(spec, dir=nil) click to toggle source
 
               # File rubygems/source_specific_file.rb, line 23
def download(spec, dir=nil)
  return @path if spec == @spec
  raise Gem::Exception, "Unable to download '#{spec.full_name}'"
end
            
fetch_spec(name) click to toggle source
 
               # File rubygems/source_specific_file.rb, line 17
def fetch_spec(name)
  return @spec if name == @name
  raise Gem::Exception, "Unable to find '#{name}'"
  @spec
end
            
load_specs(*a) click to toggle source
 
               # File rubygems/source_specific_file.rb, line 13
def load_specs(*a)
  [@name]
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus