Docs

Tools for generating a versioned documentation site from YARD docs.

Class: SleepingKingStudios::Docs::Data::RootObject

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

Table Of Contents

Overview

Object representing the top-level Ruby namespace.

Each namespace can define the following elements:

See Also

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}

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Generates a JSON-compatible representation of the namespace.

Returns a Hash with the following keys:

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

Returns

#class_attributes => Array<Hash>

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Finds the class attributes defined for the namespace.

For each class attribute, it returns a Hash with the following keys:

Returns

#class_methods => Array<Hash{String => String}>

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Finds the class methods defined for the namespace.

For each method, it returns a Hash with the following keys:

Returns

#constants => Array<String>

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Finds the names of the constants defined under this namespace.

Returns

#data_path => String

The path to the data file.

Returns

#defined_classes => Array<Hash>

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Finds the Classes defined under this namespace, if any.

For each defined Class, it returns a Hash with the following keys:

Examples

# Given a class LaunchWindow in the namespace Space::Operations:
namespace.name
#=> 'Space::Operations'
namespace.defined_classes
#=> [{ 'name' => 'LaunchWindow', 'slug' => 'launch-window' }]

Returns

#defined_modules => Array<Hash>

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Finds the Modules defined under this namespace, if any.

For each defined Module, it returns a Hash with the following keys:

Examples

# Given a class FuelConsumer in the namespace Space::Engineering:
namespace.name
#=> 'Space::Engineering'
namespace.defined_classes
#=> [{ 'name' => 'FuelConsumer', 'slug' => 'fuel-consumer' }]

Returns

#instance_attributes => Array<Hash>

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Finds the instance attributes defined for the namespace.

For each instance attribute, it returns a Hash with the following keys:

Returns

#instance_methods => Array<Hash{String => String}>

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Finds the instance methods defined for the namespace.

For each method, it returns a Hash with the following keys:

Returns

#name => String

The full, qualified name of the namespace.

Returns

#slug => String

The name of the namespace in url-safe format.

Returns

#type => String

Inherited From
SleepingKingStudios::Docs::Data::NamespaceObject

Returns

Back To Top


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