Class: Gem::Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/resolver.rb,
lib/bundler/rubygems_ext.rb,
lib/bundler/shared_helpers.rb

Direct Known Subclasses

Bundler::Dependency

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#groupsObject

Returns the value of attribute groups.



104
105
106
# File 'lib/bundler/rubygems_ext.rb', line 104

def groups
  @groups
end

#sourceObject

Returns the value of attribute source.



104
105
106
# File 'lib/bundler/rubygems_ext.rb', line 104

def source
  @source
end

Instance Method Details

#required_byObject



16
17
18
# File 'lib/bundler/resolver.rb', line 16

def required_by
  @required_by ||= []
end

#requirementObject



8
9
10
# File 'lib/bundler/shared_helpers.rb', line 8

def requirement
  version_requirements
end

#to_lockObject



112
113
114
115
116
117
118
# File 'lib/bundler/rubygems_ext.rb', line 112

def to_lock
  out = "  #{name}"
  unless requirement == Gem::Requirement.default
    out << " (#{requirement.to_s})"
  end
  out
end

#to_yaml_propertiesObject



108
109
110
# File 'lib/bundler/rubygems_ext.rb', line 108

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