class Crygen::Utils::Indentation

Overview

The static class that enables to control the indentation of the code. This is useful when we create the nested objects (for example: nested classes and structs).

Defined in:

utils/indentation.cr

Class Method Summary

Class Method Detail

def self.add_indent(size : UInt8 = 2) : Void #

Adds the indentation with the defined size.


[View source]
def self.complete_reset : Void #

Resets the indentation to zero without restoration.


[View source]
def self.generate : String #

Generate the indentation.


[View source]
def self.remove_indent(size : UInt8 = 2) : Void #

Removes the indentation with the defined size.


[View source]
def self.reset : Void #

Resets temporarily the indentation to zero but keep the number for restoring.


[View source]
def self.restore : Void #

Restores the number of spaces for indentation.


[View source]