Class: 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
-
#value ⇒ String
The source code representing the constant’s value.
Attributes inherited from Base
#base_docstring, #dynamic, #files, #group, #namespace, #signature, #source, #source_type, #visibility
Method Summary
Methods inherited from Base
===, #[], #[]=, #add_file, #add_tag, #copy_to, #docstring, #docstring=, #dynamic?, #equal?, #file, #format, #has_tag?, #hash, #initialize, #inspect, #line, #method_missing, #name, new, #path, #relative_path, #root?, #sep, #tag, #tags, #title, #to_ary, #type
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
#value ⇒ String
The source code representing the constant’s value
10 11 12 |
# File 'lib/yard/code_objects/constant_object.rb', line 10 def value @value end |