Sha256: 5d6c4a3cc934037bfa421725e0b03fd046f8115158bc42d2c879b4e6bab3f38e

Contents?: true

Size: 1.21 KB

Versions: 102

Compression:

Stored size: 1.21 KB

Contents

##
# A normal module, like NormalClass

class RDoc::NormalModule < RDoc::ClassModule

  def inspect # :nodoc:
    "#<%s:0x%x module %s includes: %p attributes: %p methods: %p aliases: %p>" % [
      self.class, object_id,
      full_name, @includes, @attributes, @method_list, @aliases
    ]
  end

  ##
  # The definition of this module, <tt>module MyModuleName</tt>

  def definition
    "module #{full_name}"
  end

  ##
  # This is a module, returns true

  def module?
    true
  end

  def pretty_print q # :nodoc:
    q.group 2, "[module #{full_name}: ", "]" do
      q.breakable
      q.text "includes:"
      q.breakable
      q.seplist @includes do |inc| q.pp inc end
      q.breakable

      q.text "attributes:"
      q.breakable
      q.seplist @attributes do |inc| q.pp inc end
      q.breakable

      q.text "methods:"
      q.breakable
      q.seplist @method_list do |inc| q.pp inc end
      q.breakable

      q.text "aliases:"
      q.breakable
      q.seplist @aliases do |inc| q.pp inc end
      q.breakable

      q.text "comment:"
      q.breakable
      q.pp comment
    end
  end

  ##
  # Modules don't have one, raises NoMethodError

  def superclass
    raise NoMethodError, "#{full_name} is a module"
  end

end

Version data entries

102 entries across 80 versions & 20 rubygems

Version Path
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/lib/rdoc/normal_module.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/lib/rdoc/normal_module.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/lib/rdoc/normal_module.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/lib/rdoc/normal_module.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/lib/rdoc/normal_module.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
challah-1.0.0.beta3 vendor/bundle/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
challah-1.0.0.beta2 vendor/bundle/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
challah-1.0.0.beta vendor/bundle/gems/rdoc-3.12/lib/rdoc/normal_module.rb
challah-1.0.0.beta vendor/bundle/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
fc-webicons-0.0.2 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
fc-webicons-0.0.1 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/lib/rdoc/normal_module.rb
rdoc-3.12.2 lib/rdoc/normal_module.rb
active_mailer-0.0.5 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/lib/rdoc/normal_module.rb