class Gem::Dependency
def encode_with(coder)
def encode_with(coder) to_yaml_properties.each do |ivar| coder[ivar.to_s.sub(/^@/, "")] = instance_variable_get(ivar) end end
def force_ruby_platform
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
def to_lock
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
def to_yaml_properties
def to_yaml_properties instance_variables.reject {|p| ["@source", "@groups"].include?(p.to_s) } end