Ruby: The Next Facet.
Uloženo v:
| Název: | Ruby: The Next Facet. |
|---|---|
| Autoři: | Wilson, Matthew |
| Zdroj: | C/C++ Users Journal. Jul2004, Vol. 22 Issue 7, p40-45. 5p. 1 Color Photograph. |
| Témata: | *COMPUTER programming, *COMPUTER programmers, RUBY (Computer program language), ARTIFICIAL languages |
| People: | MATSUMOTO, Yukihiro |
| Abstrakt: | This article provides information on Ruby, an object-oriented scripting language invented by Yukihiro Matsumoto. Ruby is easy to learn for anyone who has mastered any of the C-family languages. The set of major tasks performed in the initialization function revolve around the Recls module itself. The first thing is to define a module, which is done by passing the Recls string to rb define module(). The last part of the module definition is to create entries for the module-level functions. Like D, Ruby lets one calls no-parameter methods without braces, meaning that a method call looks syntactically like a member variable access. D calls them properties, Ruby calls them attributes. Once Ruby has been implemented, it can be used trough a full-test program available at http://www.cuj.com/code/. The main work is done within the doSearch() method. Like other scripting languages, code that is not encapsulated within a class or a method is part of the mainline. It is all pretty standard stuff to Ruby programmers, and should be reasonably obvious to those who are not. The other noteworthy part is the use of the Recls module roots attribute, which is used if the options request search over all filesystem roots. |
| Databáze: | Business Source Index |
| Abstrakt: | This article provides information on Ruby, an object-oriented scripting language invented by Yukihiro Matsumoto. Ruby is easy to learn for anyone who has mastered any of the C-family languages. The set of major tasks performed in the initialization function revolve around the Recls module itself. The first thing is to define a module, which is done by passing the Recls string to rb define module(). The last part of the module definition is to create entries for the module-level functions. Like D, Ruby lets one calls no-parameter methods without braces, meaning that a method call looks syntactically like a member variable access. D calls them properties, Ruby calls them attributes. Once Ruby has been implemented, it can be used trough a full-test program available at http://www.cuj.com/code/. The main work is done within the doSearch() method. Like other scripting languages, code that is not encapsulated within a class or a method is part of the mainline. It is all pretty standard stuff to Ruby programmers, and should be reasonably obvious to those who are not. The other noteworthy part is the use of the Recls module roots attribute, which is used if the options request search over all filesystem roots. |
|---|---|
| ISSN: | 10752838 |
Nájsť tento článok vo Web of Science