Ruby for Beginners 2023: A Gentle Introduction to Programming with Ruby 9798223129936

Unlock the full potential of the Ruby programming language with this comprehensive guide 'Ruby for Beginners'

194 140 2MB

English Pages 281 Year 2023

Report DMCA / Copyright

DOWNLOAD FILE

Ruby for Beginners 2023: A Gentle Introduction to Programming with Ruby
 9798223129936

Table of contents :
Cover Page
Title Page
Copyright Page
1 GETTING STARTED
Help me write an introduction to the Ruby programming language
Installing Ruby
Running Ruby
Ruby Is an Object-Oriented Language
2 Some Basic Ruby
Arrays and Hashes
Control Structures
Regular Expressions
Blocks and Iterators
Reading and ’Riting
Onward and Upward
3 CLASSES, OBJECTS, AND VARIABLES
Inheritance and Messages
Objects and Attributes
Class Variables and Class Methods
Access Control
Variables
4 CONTAINERS, BLOCKS, AND ITERATORS
Containers
Blocks and Iterators
Containers Everywhere
Numbers
Strings
Ranges
Regular Expressions
6 MORE ABOUT METHODS
Defining a Method
Calling a Method
7 EXPRESSIONS
Operator Expressions
Miscellaneous Expressions
Assignment
Conditional Execution
Case Expressions
Loops
Variable Scope, Loops, and Blocks
8 EXCEPTIONS, CATCH, AND THROW
The Exception Class
Handling Exceptions Raising Exceptions
Catch and Throw
9 MODULES
Namespaces
Mixins
Iterators and the Enumerable Module
Composing Modules
Including Other Files
10 BASIC INPUT AND OUTPUT
What Is an IO Object?
Opening and Closing Files
Reading and Writing Files
11 THREADS AND PROCESSES
Multithreading
Controlling the Thread Scheduler
Mutual Exclusion
Running Multiple Processes
12 UNIT TESTING
Test::Unit Framework
Structuring Tests
Organizing and Running Tests
13 WHEN TROUBLE STRIKES
Ruby Debugger
Interactive Ruby
Editor Support
14 RUBY AND ITS WORLD
Command-Line Arguments
Program Termination
Environment Variables
Where Ruby Finds Its Modules
Build Environment
15 INTERACTIVE RUBY SHELL
Command Line
Configuration
Commands
Restrictions
rtags and xmp .
16 DOCUMENTING RUBY
Adding RDoc to Ruby Code
Adding RDoc to C Extensions
Running RDoc
Displaying Program Usage .
17 EXTENDING RUBY
Your First Extension
Ruby Objects in C
The Jukebox Extension
Memory Allocation
Ruby Type System
Creating an Extension
Embedding a Ruby Interpreter
Bridging Ruby to Other Languages
Ruby C Language API
Source Layout
The Basic Types
Names
Variables and Constants
Predefined Variables
Expressions
Boolean Expressions
if and unless Expressions
case Expressions
Loop Constructs
Method Definition
Invoking a Method
Aliasing
Class Definition
Module Definitions
Access Control
Blocks, Closures, and Proc Objects
Exceptions
Catch and Throw
Sign up for Isabella Rivera's Mailing List

Polecaj historie