Glossary
- accessor
-
A method for accessing data in a class that is usually inaccessible otherwise. Also called getter and setter methods—
def a;@a;endanddef b=(val);@b=val;endare examples of a getter and setter, respectively. TheModule#attr,Module#attr_accessor,Module#attr_reader, andModule#attr_writermetaprogramming methods also define accessors. - aliasing
-
Using the Ruby keyword
aliasorModule#alias_method, you can alias a method by specifying a new and old name. - ARGF
-
An I/O-like stream that allows access to a virtual concatenation of all files provided on the command line, or standard input if no files are provided.
- ARGV
-
An array that contains all of the command-line arguments passed to a program.
- argument
-
The value of a parameter, passed to a method. With the method
hello ( name ), in the callhello ( "Matz" ), the value"Matz"is the argument. See also method. - array
-
A data structure containing an ordered list of elements—which can be composed of any Ruby object—starting with an index of 0. See also hash.
- ASCII
-
Abbreviation for American Standard Code for Information Interchange. ASCII is a character set representing 128 letters, numbers, symbols, and special codes, in the range 0–127. Each character can be represented by an 8-bit byte (octet). One of many possible character sets (encodings) now available in Ruby. See also UTF-8.
- block
-
A nameless function, always associated with a method call, contained in a pair of braces (
{}) ordo/end. - block comment ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access