ruby-win32/lib/ruby/site_ruby/1.8/rubygems/specification.rb
def to_yaml(opts = {}) # :nodoc:
      mark_version

      attributes = @@attributes.map { |name,| name.to_s }.sort
      attributes = attributes - %w[name version platform]

      yaml = YAML.quick_emit object_id, opts do |out|
        out.map taguri, to_yaml_style do |map|
          map.add 'name', @name
          map.add 'version', @version
          platform = case @original_platform
                     when nil, '' then
                       'ruby'
                     when String then
                       @original_platform
                     else
                       @original_platform.to_s
                     end
          map.add 'platform', platform

          attributes.each do |name|
            map.add name, instance_variable_get("@#{name}")
          end
        end
      end
    end
# Export methods (YAML and Ruby code) ----------------------------
Export methods (YAML and Ruby code)
Export methods ( YAML and Ruby code )
def to_yaml(opts = {}) 
      mark_version
      attributes = @@attributes.map { |name,| name.to_s }.sort
      attributes = attributes - %w[name version platform]
      yaml = YAML.quick_emit object_id, opts do |out|
        out.map taguri, to_yaml_style do |map|
          map.add 'name', @name
          map.add 'version', @version
          platform = case @original_platform
                     when nil, '' then
                       'ruby'
                     when String then
                       @original_platform
                     else
                       @original_platform.to_s
                     end
          map.add 'platform', platform
          attributes.each do |name|
            map.add name, instance_variable_get("@#{name}")
          end
        end
      end
    end
def to_yaml ( opts = { } ) mark_version attributes = @@attributes . map { | name , | name . to_s } . sort attributes = attributes - %w[ name version platform ] yaml = YAML . quick_emit object_id , opts do | out | out . map taguri , to_yaml_style do | map | map . add 'name' , @name map . add 'version' , @version platform = case @original_platform when nil , '' then 'ruby' when String then @original_platform else @original_platform . to_s end map . add 'platform' , platform attributes . each do | name | map . add name , instance_variable_get ( "@#{name}" ) end end end end
Export methods (YAML and Ruby code)
Export methods ( YAML and Ruby code )
# :nodoc:
opts