Class YARD::CodeObjects::ClassObject
In: lib/yard/code_objects/class_object.rb
Parent: NamespaceObject

A ClassObject represents a Ruby class in source code. It is a {ModuleObject} with extra inheritance semantics through the superclass.

Methods

Attributes

superclass  [R]  The {ClassObject} that this class object inherits from in Ruby source. @return [ClassObject] a class object that is the superclass of this one

Public Class methods

Creates a new class object in namespace with name

@see Base.new

Public Instance methods

Returns the list of constants matching the options hash.

@param [Hash] opts the options hash to match @option opts [Boolean] :inherited (true) whether inherited constant should be

  included in the list

@option opts [Boolean] :included (true) whether mixed in constant should be

  included in the list

@return [Array<ConstantObject>] the list of constant that matched

Returns the inheritance tree of the object including self.

@param [Boolean] include_mods whether or not to include mixins in the

  inheritance tree.

@return [Array<NamespaceObject>] the list of code objects that make up

  the inheritance tree.

Returns only the constants that were inherited.

@return [Array<ConstantObject>] the list of inherited constant objects

Returns only the methods that were inherited.

@return [Array<MethodObject>] the list of inherited method objects

Whether or not the class is a Ruby Exception

@return [Boolean] whether the object represents a Ruby exception

Returns the list of methods matching the options hash. Returns all methods if hash is empty.

@param [Hash] opts the options hash to match @option opts [Boolean] :inherited (true) whether inherited methods should be

  included in the list

@option opts [Boolean] :included (true) whether mixed in methods should be

  included in the list

@return [Array<MethodObject>] the list of methods that matched

Sets the superclass of the object

@param [Base, Proxy, String, Symbol, nil] object the superclass value @return [void]

[Validate]