method

encode_with

v1_9_3_392 - Show latest stable - Class: Gem::Specification
encode_with(coder)
public

No documentation available.

# File lib/rubygems/specification.rb, line 1106
  def encode_with coder # :nodoc:
    mark_version

    coder.add 'name', @name
    coder.add 'version', @version
    platform = case @original_platform
               when nil, '' then
                 'ruby'
               when String then
                 @original_platform
               else
                 @original_platform.to_s
               end
    coder.add 'platform', platform

    attributes = @@attributes.map(&:to_s) - ]name version platform]
    attributes.each do |name|
      coder.add name, instance_variable_get("@#{name}")
    end
  end