EEngineersNationinmalloc.engineersnation.com·Jan 27, 2024 · 5 min readCrystalLang-BlocksA block is the same thing as a method, but it does not belong to an object. Blocks are called closures in other programming languages. There are some important points about Blocks in crystal: Block can accept arguments and returns a value. ...00
EEngineersNationinmalloc.engineersnation.com·Jan 13, 2024 · 1 min readCrystalLang-Initialize MethodThe initialize method is useful when we want to initialize some class variables at the time of object creation. The initialize method is part of the object-creation process in Crystal and it allows us to set the initial values for an object. Below ar...00
EEngineersNationinmalloc.engineersnation.com·Jan 8, 2024 · 3 min readCrystalLang-Regex01A regular expression is a sequence of characters that define a search pattern, mainly for use in pattern matching with strings. Ruby regular expressions i.e. Crysal regex for short, helps us to find particular patterns inside a string. Two uses of Cr...00
EEngineersNationinmalloc.engineersnation.com·Jan 4, 2024 · 4 min readCrystalLang-IteratorsThe word iterate means doing one thing multiple times and that is what iterators do. Sometimes iterators are termed as the custom loops. “Iterators” is the object-oriented concept in crystal. In more simple words, iterators are the methods w...00
EEngineersNationinmalloc.engineersnation.com·Dec 28, 2023 · 3 min readCrystalLang-Static MembersIn crystal lang, static members are known as class variables. These variables are shared among all instances of a class and are declared using the @@ symbol. Class variables retain their value across different instances of the class and can be access...00