class TLParser::Definition

Defined in:

tl_parser/tl/definition.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(namespace : Array(String), name : String, id : UInt32, params : Array(TLParser::Parameter), type : TLParser::Type, category : TLParser::Category, description : String = "") #

[View source]

Class Method Detail

def self.parse(str : String) #

[View source]

Instance Method Detail

def ==(other) #
Description copied from class Reference

Returns false (other can only be a Value here).


[View source]
def category : Category #

The category to which this definition belongs


[View source]
def category=(category : Category) #

The category to which this definition belongs


[View source]
def description : String #

A description for this definition


[View source]
def description=(description : String) #

A description for this definition


[View source]
def full_name #

Convenience function to format both the namespace and name back into a single string.


[View source]
def id : UInt32 #

The numeric identifier of this definition.

If a definition has an identifier, it overrides this value. Otherwise, the identifier is inferred from the definition.


[View source]
def id=(id : UInt32) #

The numeric identifier of this definition.

If a definition has an identifier, it overrides this value. Otherwise, the identifier is inferred from the definition.


[View source]
def name : String #

The name of this definition. Also known as "predicate" or "method".


[View source]
def name=(name : String) #

The name of this definition. Also known as "predicate" or "method".


[View source]
def namespace : Array(String) #

The namespace components of the definition. This list will be empty if the name of the definition belongs to the global namespace.


[View source]
def namespace=(namespace : Array(String)) #

The namespace components of the definition. This list will be empty if the name of the definition belongs to the global namespace.


[View source]
def namespace_str(joiner = ".", proc : String -> String = ->(str : String) do str end) #

[View source]
def params : Array(Parameter) #

A possibly-empty list of parameters this definition has.


[View source]
def params=(params : Array(Parameter)) #

A possibly-empty list of parameters this definition has.


[View source]
def to_s(io) #

[View source]
def type : Type #

The type to which this definition belongs.


[View source]
def type=(type : Type) #

The type to which this definition belongs.


[View source]