Sha256: 93cfa505b4639d41eddb2db7d3b7801dae831b4b7dfbb66b5ea8822720303a5f

Contents?: true

Size: 1.21 KB

Versions: 53

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true
require 'rubygems/specification'

class Gem::Specification
  # @since 0.5.3
  def has_yardoc=(value)
    @has_rdoc = value ? 'yard' : false
  end

  def has_yardoc
    @has_rdoc == 'yard'
  end

  undef has_rdoc?
  def has_rdoc?
    (@has_rdoc ||= true) && @has_rdoc != 'yard'
  end

  alias has_yardoc? has_yardoc

  # has_rdoc should not be ignored!
  if respond_to?(:overwrite_accessor)
    overwrite_accessor(:has_rdoc) { @has_rdoc ||= true }
    overwrite_accessor(:has_rdoc=) {|v| @has_rdoc = v }
  else
    attr_accessor :has_rdoc
  end

  if defined?(Gem::VERSION) && Gem::VERSION >= '1.7.'
    def _dump_with_rdoc(limit)
      dmp = _dump_without_rdoc(limit)
      dmp[15] = @has_rdoc if dmp[15] == true
      dmp
    end
    alias _dump_without_rdoc _dump
    alias _dump _dump_with_rdoc

    if class_variable_defined?(:@@default_value)
      if @@default_value.frozen?
        t = @@default_value.dup
        t[:has_rdoc] = true
        @@default_value = t.freeze
      else
        @@default_value[:has_rdoc] = true
      end
    end
    @@attributes << 'has_rdoc' if class_variable_defined?(:@@attributes)
    @@nil_attributes << 'has_rdoc' if class_variable_defined?(:@@nil_attributes)
  end
end

Version data entries

53 entries across 53 versions & 6 rubygems

Version Path
yard-0.9.31 lib/yard/rubygems/specification.rb
yard-0.9.30 lib/yard/rubygems/specification.rb
yard-0.9.29 lib/yard/rubygems/specification.rb
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/yard-0.9.28/lib/yard/rubygems/specification.rb
kinetic_sdk-5.0.20 gems/yard-0.9.25/lib/yard/rubygems/specification.rb
yard-0.9.28 lib/yard/rubygems/specification.rb
yard-0.9.27 lib/yard/rubygems/specification.rb
yard-0.9.26 lib/yard/rubygems/specification.rb
qiita_org-0.1.35 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.34 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.33 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.32 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.31 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.30 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.29 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.28 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.27 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.26 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
qiita_org-0.1.25 gems/ruby/2.7.0/gems/yard-0.9.25/lib/yard/rubygems/specification.rb
yard-0.9.25 lib/yard/rubygems/specification.rb