In Files

  • rubygems/basic_specification.rb

Class/Module Index [+]

Quicksearch

Gem::BasicSpecification

BasicSpecification is an abstract class which implements some common code used by both Specification and StubSpecification.

Attributes

filename[R]

The filename of the gem specification

Public Class Methods

default_specifications_dir() click to toggle source
 
               # File rubygems/basic_specification.rb, line 5
def self.default_specifications_dir
  File.join(Gem.default_dir, "specifications", "default")
end
            

Public Instance Methods

activated?() click to toggle source

True when the gem has been activated

 
               # File rubygems/basic_specification.rb, line 40
def activated?
  raise NotImplementedError
end
            
contains_requirable_file?(file) click to toggle source

Return true if this spec can require file.

 
               # File rubygems/basic_specification.rb, line 70
def contains_requirable_file? file
  root     = full_gem_path
  suffixes = Gem.suffixes

  require_paths.any? do |lib|
    base = "#{root}/#{lib}/#{file}"
    suffixes.any? { |suf| File.file? "#{base}#{suf}" }
  end
end
            
filename=(path) click to toggle source

Set the filename of the Specification was loaded from. path is converted to a String.

 
               # File rubygems/basic_specification.rb, line 59
def filename= path
  @filename      = path && path.to_s

  @full_gem_path = nil
  @gems_dir      = nil
  @base_dir      = nil
end
            
full_gem_path() click to toggle source

The full path to the gem (install path + full name).

 
               # File rubygems/basic_specification.rb, line 83
def full_gem_path
  # TODO: This is a heavily used method by gems, so we'll need
  # to aleast just alias it to #gem_dir rather than remove it.
  @full_gem_path ||= find_full_gem_path
end
            
name() click to toggle source

Name of the gem

 
               # File rubygems/basic_specification.rb, line 12
def name
  raise NotImplementedError
end
            
platform() click to toggle source

Platform of the gem

 
               # File rubygems/basic_specification.rb, line 26
def platform
  raise NotImplementedError
end
            
require_paths() click to toggle source

Require paths of the gem

 
               # File rubygems/basic_specification.rb, line 33
def require_paths
  raise NotImplementedError
end
            
to_spec() click to toggle source

Return a Gem::Specification from this gem

 
               # File rubygems/basic_specification.rb, line 47
def to_spec
  raise NotImplementedError
end
            
version() click to toggle source

Version of the gem

 
               # File rubygems/basic_specification.rb, line 19
def version
  raise NotImplementedError
end