Docs

Tools for generating a versioned documentation site from YARD docs.

Class: SleepingKingStudios::Docs::Data::MethodObject

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

Table Of Contents

Overview

Object representing a Ruby method.

Each method has a name and a signature, and can define the following elements:

In addition, a method 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

#alias? => true, false

Returns

#aliases => Array<String>

Returns

#as_json => Hash{String => Object}

Generates a JSON-compatible representation of the method.

Returns a Hash with the following keys:

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

Finally, the method may have one or more overloads, which replace or supplement the method with alternative signatures or documentation.

Returns

#class_method? => Boolean

Returns

#constructor? => Boolean

Also known as: constructor

Returns

#data_path => String

The path to the data file.

Returns

#description => String

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

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

Returns

See Also

#instance_method? => Boolean

Returns

#metadata => Object

Additional metadata tags from the documentation.

See Also

#name => String

The full, qualified name of the method.

Returns

#options => Array<Hash>

The documented options of the method.

Each option is a Hash with the following keys:

Returns

#overloaded? => true, false

Checks if the method has been completely overloaded.

A completely overloaded method has no description and no tags other than exactly one @overload tag. This case is common when documenting a method with a different signature.

Returns

#overloads => Object

The documented overloads for the method.

Each overload is a JSON representation of a method, and includes the same tags and properties (with the exception that an overload cannot itself have overloads).

See Also

#params => Array<Hash>

The documented parameters of the method.

Each parameter is a Hash with the following keys:

Returns

#parent_path => String

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

Returns

#raises => Array<Hash>

The documented raised exceptions of the method.

Each raised exception is a Hash with the following keys:

Returns

#returns => Array<Hash>

The return type or types of the method.

Each return type or types is a Hash with the following keys:

Returns

See Also

#short_description => String

A short description of the method.

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

Returns

See Also

#signature => String

The name and parameters of the method.

Returns

#slug => String

The name of the method in url-safe format.

Returns

#yield_params => Array<Hash>

The parameters of the yielded to the block.

Each parameter is a Hash with the following keys:

Returns

#yield_returns => Array<Hash>

The return type or types of the yielded block.

Each return type or types is a Hash with the following keys:

Returns

See Also

#yields => Array<Hash>

The yielded block or blocks of method.

Each yielded block is a Hash with the following keys:

Returns

See Also

Back To Top


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