Docs

Tools for generating a versioned documentation site from YARD docs.

Class: SleepingKingStudios::Docs::Data::ConstantObject

Parent Namespace
SleepingKingStudios::Docs::Data
Inherited Classes
SleepingKingStudios::Docs::Data::Base > Object
Defined In
lib/sleeping_king_studios/docs/data/constant_object.rb

Table Of Contents

Overview

Object representing a Ruby constant.

Each constant has a name and a value. In addition, a constant may have a short description, a full description, and metadata.

Back To Top

Constructor

#initialize(native:) => Base

Inherited From
SleepingKingStudios::Docs::Data::Base

Parameters

Returns

Back To Top

Instance Methods

#as_json => Hash{String => Object}

Generates a JSON-compatible representation of the constant.

Returns a Hash with the following keys:

Additionally, the returned Hash will conditionally include the following keys, if the constant defines at least one of the corresponding code objects.

Returns

#data_path => String

The path to the data file.

Returns

#description => String

The full description of the constant, minus the first clause.

The remainder of the constant description, if any, after subtracting the short description (separated by the first paragraph break).

Returns

See Also

#metadata => Object

Additional metadata tags from the documentation.

See Also

#name => String

The full, qualified name of the constant.

Returns

#parent_path => String

The path to the defining class or module’s data file.

Returns

#short_description => String

A short description of the constant.

The first part of the constant description, separated by the first paragraph break. Typically should fit on a single line of text.

Returns

See Also

#slug => String

The name of the constant in url-safe format.

Returns

#value => String

A String representation of the value of the constant.

Returns

Back To Top


Back to Documentation | Versions | 0.2 | Reference | SleepingKingStudios | SleepingKingStudios::Docs | SleepingKingStudios::Docs::Data