Class: YARD::CodeObjects::ClassVariableObject

Inherits:
Base
  • Object
show all
Defined in:
lib/yard/code_objects/class_variable_object.rb

Overview

Represents a class variable inside a namespace. The path is expressed in the form "A::B::@@classvariable"

Instance Attribute Summary (collapse)

Constructor Details

This class inherits a constructor from YARD::CodeObjects::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class YARD::CodeObjects::Base

Instance Attribute Details

- (Docstring) base_docstring (readonly) Originally defined in class Base

The non-localized documentation string associated with the object

Returns:

Since:

  • 0.8.4

- (Boolean) dynamic Originally defined in class Base

Marks whether or not the method is conditionally defined at runtime

Returns:

  • (Boolean)

    true if the method is conditionally defined at runtime

- (Array<String>) files (readonly) Originally defined in class Base

The files the object was defined in. To add a file, use #add_file.

Returns:

See Also:

- (String) group Originally defined in class Base

Returns the group this object is associated with

Returns:

  • (String)

    the group this object is associated with

Since:

  • 0.6.0

- (NamespaceObject) namespace Also known as: parent Originally defined in class Base

The namespace the object is defined in. If the object is in the top level namespace, this is Registry.root

Returns:

- (String) signature Originally defined in class Base

The one line signature representing an object. For a method, this will be of the form "def meth(arguments...)". This is usually the first source line.

Returns:

  • (String)

    a line of source

- (String?) source Originally defined in class Base

The source code associated with the object

Returns:

  • (String, nil)

    source, if present, or nil

- (Symbol) source_type Originally defined in class Base

Language of the source code associated with the object. Defaults to :ruby.

Returns:

  • (Symbol)

    the language type

- (String) value

Returns the class variable’s value

Returns:

  • (String)

    the class variable’s value



6
7
8
# File 'lib/yard/code_objects/class_variable_object.rb', line 6

def value
  @value
end

- (Symbol) visibility Originally defined in class Base

Returns the visibility of an object (:public, :private, :protected)

Returns:

  • (Symbol)

    the visibility of an object (:public, :private, :protected)