123456789_123456789_123456789_123456789_123456789_

Class: Gem::Dependency

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: lib/bundler/rubygems_ext.rb

Instance Attribute Summary

Instance Method Summary

::Bundler::ForcePlatform - Included

#default_force_ruby_platform

The :force_ruby_platform value used by dependencies for resolution, and by locked specifications for materialization is false by default, except for TruffleRuby.

Instance Attribute Details

#groups (rw)

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 161

attr_accessor :source, :groups

#source (rw)

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 161

attr_accessor :source, :groups

Instance Method Details

#encode_with(coder)

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 171

def encode_with(coder)
  to_yaml_properties.each do |ivar|
    coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar)
  end
end

#eql?

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 163

alias_method :eql?, :==

#force_ruby_platform

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 165

def force_ruby_platform
  return @force_ruby_platform if defined?(@force_ruby_platform) && !@force_ruby_platform.nil?

  @force_ruby_platform = default_force_ruby_platform
end

#to_lock

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 181

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

#to_yaml_properties

[ GitHub ]

  
# File 'lib/bundler/rubygems_ext.rb', line 177

def to_yaml_properties
  instance_variables.reject {|p| ["@source", "@groups"].include?(p.to_s) }
end