Class: Bundler::Resolver::SpecGroup
- Inherits:
-
Object
- Object
- Bundler::Resolver::SpecGroup
- Defined in:
- lib/bundler/resolver/spec_group.rb
Instance Method Summary collapse
- #dependencies ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(specs) ⇒ SpecGroup
constructor
A new instance of SpecGroup.
- #name ⇒ Object
- #source ⇒ Object
- #to_s ⇒ Object
- #to_specs(force_ruby_platform) ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(specs) ⇒ SpecGroup
Returns a new instance of SpecGroup.
6 7 8 |
# File 'lib/bundler/resolver/spec_group.rb', line 6 def initialize(specs) @specs = specs end |
Instance Method Details
#dependencies ⇒ Object
38 39 40 41 42 |
# File 'lib/bundler/resolver/spec_group.rb', line 38 def dependencies @dependencies ||= @specs.map do |spec| __dependencies(spec) + (spec) end.flatten.uniq end |
#empty? ⇒ Boolean
10 11 12 |
# File 'lib/bundler/resolver/spec_group.rb', line 10 def empty? @specs.empty? end |
#name ⇒ Object
14 15 16 |
# File 'lib/bundler/resolver/spec_group.rb', line 14 def name @name ||= exemplary_spec.name end |
#source ⇒ Object
22 23 24 |
# File 'lib/bundler/resolver/spec_group.rb', line 22 def source @source ||= exemplary_spec.source end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/bundler/resolver/spec_group.rb', line 34 def to_s sorted_spec_names.join(", ") end |
#to_specs(force_ruby_platform) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/bundler/resolver/spec_group.rb', line 26 def to_specs(force_ruby_platform) @specs.map do |s| lazy_spec = LazySpecification.from_spec(s) lazy_spec.force_ruby_platform = force_ruby_platform lazy_spec end end |
#version ⇒ Object
18 19 20 |
# File 'lib/bundler/resolver/spec_group.rb', line 18 def version @version ||= exemplary_spec.version end |