Class: Gem::Dependency
- Inherits:
-
Object
- Object
- Gem::Dependency
- Includes:
- Bundler::ForcePlatform, FilterIgnoredSpecs
- Defined in:
- lib/bundler/rubygems_ext.rb
Direct Known Subclasses
Defined Under Namespace
Modules: FilterIgnoredSpecs
Instance Attribute Summary collapse
-
#force_ruby_platform ⇒ Object
readonly
Returns the value of attribute force_ruby_platform.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Methods included from Bundler::ForcePlatform
Methods included from FilterIgnoredSpecs
Instance Attribute Details
#force_ruby_platform ⇒ Object (readonly)
Returns the value of attribute force_ruby_platform.
338 339 340 |
# File 'lib/bundler/rubygems_ext.rb', line 338 def force_ruby_platform @force_ruby_platform end |
#groups ⇒ Object
Returns the value of attribute groups.
340 341 342 |
# File 'lib/bundler/rubygems_ext.rb', line 340 def groups @groups end |
#source ⇒ Object
Returns the value of attribute source.
340 341 342 |
# File 'lib/bundler/rubygems_ext.rb', line 340 def source @source end |
Instance Method Details
#encode_with(coder) ⇒ Object
345 346 347 348 349 |
# File 'lib/bundler/rubygems_ext.rb', line 345 def encode_with(coder) [:@name, :@requirement, :@type, :@prerelease, :@version_requirements].each do |ivar| coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar) end end |
#to_lock ⇒ Object
352 353 354 355 356 357 358 359 |
# File 'lib/bundler/rubygems_ext.rb', line 352 def to_lock out = String.new(" #{name}") unless requirement.none? reqs = requirement.requirements.map {|o, v| "#{o} #{v}" }.sort.reverse out << " (#{reqs.join(", ")})" end out end |