Class: Gem::TestCase::StaticSet
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Gem::Resolver::Set
|
|
Instance Chain:
self,
::Gem::Resolver::Set
|
|
Inherits: |
Gem::Resolver::Set
|
Defined in: | lib/rubygems/test_case.rb |
Overview
The StaticSet is a static set of gem specifications used for testing only. It is available by requiring ::Gem::TestCase.
Class Method Summary
-
.new(specs) ⇒ StaticSet
constructor
Creates a new
StaticSet
for the givenspecs
Instance Attribute Summary
-
#remote
rw
A StaticSet ignores remote because it has a fixed set of gems.
::Gem::Resolver::Set - Inherited
#errors | Errors encountered when resolving gems. |
#prerelease | When true, allows matching of requests to prerelease gems. |
#remote | Set to true to disable network access for this set. |
Instance Method Summary
-
#add(spec)
Adds #spec to this set.
-
#find_all(dep)
Finds all gems matching #dep in this set.
-
#find_spec(dep)
Finds #dep in this set.
-
#load_spec(name, ver, platform, source)
Loads a ::Gem::Specification from this set which has the given
name
, versionver
,platform
.
::Gem::Resolver::Set - Inherited
Constructor Details
.new(specs) ⇒ StaticSet
Creates a new StaticSet
for the given specs
# File 'lib/rubygems/test_case.rb', line 1358
def initialize(specs) super() @specs = specs @remote = true end
Instance Attribute Details
#remote (rw)
A StaticSet ignores remote because it has a fixed set of gems.
# File 'lib/rubygems/test_case.rb', line 1353
attr_accessor :remote
Instance Method Details
#add(spec)
Adds Gem::TestCase#spec to this set.
#find_all(dep)
Finds all gems matching Gem::TestCase#dep in this set.
#find_spec(dep)
Finds Gem::TestCase#dep in this set.
#load_spec(name, ver, platform, source)
Loads a ::Gem::Specification from this set which has the given name
, version ver
, platform
. The source
is ignored.