Class: YARD::CodeObjects::ConstantObject
- Inherits:
-
Base
- Object
- Base
- YARD::CodeObjects::ConstantObject
- Defined in:
- lib/yard/code_objects/constant_object.rb
Overview
A ConstantObject represents a Ruby constant (not a module or class). To access the constant's (source code) value, use #value.
Instance Attribute Summary (collapse)
-
- (Docstring) base_docstring
inherited
from Base
readonly
The non-localized documentation string associated with the object.
-
- (Boolean) dynamic
inherited
from Base
Marks whether or not the method is conditionally defined at runtime.
-
- (Array<String>) files
inherited
from Base
readonly
The files the object was defined in.
-
- (String) group
inherited
from Base
The group this object is associated with.
-
- (NamespaceObject) namespace
(also: #parent)
inherited
from Base
The namespace the object is defined in.
-
- (String) signature
inherited
from Base
The one line signature representing an object.
-
- (String?) source
inherited
from Base
The source code associated with the object.
-
- (Symbol) source_type
inherited
from Base
Language of the source code associated with the object.
-
- (String) value
The source code representing the constant's value.
-
- (Symbol) visibility
inherited
from Base
The visibility of an object (:public, :private, :protected).
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
- (Boolean) dynamic Originally defined in class Base
Marks whether or not 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.
- (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
- (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.
- (Symbol) source_type Originally defined in class Base
Language of the source code associated with the object. Defaults to :ruby.
- (String) value
The source code representing the constant's value
7 8 9 |
# File 'lib/yard/code_objects/constant_object.rb', line 7 def value @value end |
- (Symbol) visibility Originally defined in class Base
Returns the visibility of an object (:public, :private, :protected)