Sha256: 2eb068617477d1e09c81af26567bb3240f15f5cdd131163648cf03e6c854e804

Contents?: true

Size: 511 Bytes

Versions: 17

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true
##
# A singleton class

class RDoc::SingleClass < RDoc::ClassModule

  ##
  # Adds the superclass to the included modules.

  def ancestors
    superclass ? super + [superclass] : super
  end

  def aref_prefix # :nodoc:
    'sclass'
  end

  ##
  # The definition of this singleton class, <tt>class << MyClassName</tt>

  def definition
    "class << #{full_name}"
  end

  def pretty_print q # :nodoc:
    q.group 2, "[class << #{full_name}", "]" do
      next
    end
  end
end

Version data entries

17 entries across 15 versions & 6 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/rdoc-6.7.0/lib/rdoc/single_class.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/rdoc-6.8.1/lib/rdoc/code_object/single_class.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/rdoc-6.10.0/lib/rdoc/code_object/single_class.rb
rdoc-6.11.0 lib/rdoc/code_object/single_class.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/rdoc-6.7.0/lib/rdoc/single_class.rb
rdoc-6.10.0 lib/rdoc/code_object/single_class.rb
rdoc-6.9.1 lib/rdoc/code_object/single_class.rb
rdoc-6.9.0 lib/rdoc/code_object/single_class.rb
rdoc-6.8.1 lib/rdoc/code_object/single_class.rb
rdoc-6.8.0 lib/rdoc/code_object/single_class.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/rdoc-6.7.0/lib/rdoc/single_class.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/rdoc-6.7.0/lib/rdoc/single_class.rb
rdoc-6.6.3.1 lib/rdoc/single_class.rb
rdoc-6.6.2 lib/rdoc/single_class.rb
rdoc-6.6.1 lib/rdoc/single_class.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/rdoc-6.6.0/lib/rdoc/single_class.rb
rdoc-6.6.0 lib/rdoc/single_class.rb