The book of Ruby a hands-on guide for the adventurous
The Book of Ruby is an in-depth introduction to Ruby, one of the world's most popular programming languages and the backbone of the acclaimed Ruby on Rails web application framework. With an emphasis on writing clear and maintainable code, author Huw Collingbourne takes readers from the most ba...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
San Francisco :
No Starch Press
2011.
|
Edición: | 1st edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009628176806719 |
Tabla de Contenidos:
- Brief Contents; Contents in Detail; Acknowledgments; Introduction; What Is Ruby?; What Is Rails?; Matters of Ruby Style; How to Read This Book; Digging Deeper; Making Sense of the Text; Downloading Ruby; Getting the Source Code of the Sample Programs; Running Ruby Programs; The Ruby Library Documentation; 1: Strings, Numbers, Classes, and Objects; Getting and Putting Input; Strings and Embedded Evaluation; Numbers; Comments; Testing a Condition: if..then; Local and Global Variables; Classes and Objects; Instance Variables; Retrieving Data from an Object; Messages, Methods, and Polymorphism
- Constructors: new and initializeInspecting Objects; 2: Class Hierarchies, Attributes, and Class Variables; Superclasses and Subclasses; Passing Arguments to the Superclass; Accessor Methods; Attribute Readers and Writers; Calling Methods of a Superclass; Class Variables; Digging Deeper; Superclasses; The Root of All Classes; Constants Inside Classes; Partial Classes; 3: Strings and Ranges; User-Defined String Delimiters; Backquotes; String Handling; Concatenation; What About Commas?; String Assignment; Indexing into a String; Removing Newline Characters: chop and chomp; Format Strings; Ranges
- Ranges of StringsIterating with a Range; Digging Deeper; Heredocs; String Literals; 4: Arrays and Hashes; Arrays; Creating Arrays; Multidimensional Arrays; Iterating over Arrays; Indexing into Arrays; Copying Arrays; Testing Arrays for Equality; Sorting Arrays; Comparing Values; Array Methods; Hashes; Creating Hashes; Indexing into a Hash; Copying a Hash; Hash Order; Sorting a Hash; Hash Methods; Digging Deeper; Treating Hashes as Arrays; Appending vs. Concatenating; Vectors and Matrices; Sets; 5: Loops and Iterators; for Loops; Blocks and Block Parameters; Iterating upto and downto
- Multiple Iterator Argumentswhile Loops; while Modifiers; Ensuring a while Loop Executes at Least Once; until Loops; loop; Digging Deeper; The Enumerable Module; Custom Comparisons; each and yield; 6: Conditional Statements; if..then..else; and, or, and not; Negation; if..elsif; unless; if and unless Modifiers; Case Statements; The === Method; Alternative Case Syntax; Digging Deeper; Boolean Operators; Eccentricities of Boolean Operators; catch and throw; 7: Methods; Class Methods; What Are Class Methods For?; Class Variables; Ruby Constructors: new or initialize?; Singleton Methods
- Singleton ClassesOverriding Methods; Public, Protected, and Private Methods; Digging Deeper; Protected and Private Methods in Descendant Classes; Invading the Privacy of Private Methods; Singleton Class Methods; Nested Methods; Method Names; 8: Passing Arguments and Returning Values; Summarizing Instance, Class, and Singleton Methods; Returning Values; Returning Multiple Values; Default and Multiple Arguments; Assignment and Parameter Passing; Integers Are Special; The One-Way-In, One-Way-Out Principle; Modifying Receivers and Yielding New Objects
- Potential Side Effects of Reliance on Argument Values