Class: Gem::Dependency
- Inherits:
-
Object
- Object
- Gem::Dependency
- Defined in:
- lib/bundler/rubygems_ext.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Instance Attribute Details
#groups ⇒ Object
Returns the value of attribute groups.
128 129 130 |
# File 'lib/bundler/rubygems_ext.rb', line 128 def groups @groups end |
#source ⇒ Object
Returns the value of attribute source.
128 129 130 |
# File 'lib/bundler/rubygems_ext.rb', line 128 def source @source end |
Instance Method Details
#encode_with(coder) ⇒ Object
132 133 134 135 136 |
# File 'lib/bundler/rubygems_ext.rb', line 132 def encode_with(coder) to_yaml_properties.each do |ivar| coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar) end end |
#to_lock ⇒ Object
142 143 144 145 146 147 148 149 |
# File 'lib/bundler/rubygems_ext.rb', line 142 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 ⇒ Object
138 139 140 |
# File 'lib/bundler/rubygems_ext.rb', line 138 def to_yaml_properties instance_variables.reject {|p| ["@source", "@groups"].include?(p.to_s) } end |