Eduzan / Ruby
Ruby Tutorial Roadmap
Overview of Ruby
Ruby is a dynamic, object-oriented, and open-source programming language known for its simplicity, readability, and developer productivity. It is widely used for web development, scripting, automation, and backend development (notably with Ruby on Rails).
Ruby Programming Language
- History and evolution of Ruby
- Philosophy: “Developer happiness”
Comparison with Other Programming Languages
- Ruby vs Java
- Ruby vs Python
- Ruby vs C++
Importance of Ruby
- Clean and expressive syntax
- Strong object-oriented features
- Large ecosystem and community
- Ideal for rapid application development
Basic Ruby Example
- Writing and understanding a simple Ruby program
Ruby Keywords
- Reserved words and their usage
Ruby Data Types
- Numbers
- Strings
- Symbols
- Arrays
- Hashes
- Booleans
Types of Variables in Ruby
- Local variables
- Instance variables
- Class variables
- Global variables
Global Variables
- Usage and scope of global variables
Literals
- Numeric literals
- String literals
- Symbol literals
Ruby Directories
- Understanding Ruby file and directory structure
Decision-Making Statements
ifstatementif-elsestatementif-else-if- Ternary operator
Loops in Ruby
forloopwhileloopdo..whileloopuntilloop
Case Statement
- Using
casefor conditional logic
Control Flow Alteration
breakandnextstatementsredoandretrystatements
File Operations
- Creating files
- Reading files
- Writing to files
- Closing files
Ruby Methods
- Defining and calling methods
Method Visibility
- Public
- Private
- Protected
Recursion in Ruby
- Recursive method calls
Ruby Hook Methods
- Lifecycle hook methods
Ruby Range Class Methods
- Working with ranges and their methods
OOP Concepts
- Principles of object-oriented programming
Classes and Objects
- Creating classes and objects
Private Classes
- Access control in Ruby classes
Freezing Objects
- Preventing object modification using
freeze
Inheritance in Ruby
- Parent and child classes
Polymorphism
- Method overriding and dynamic behavior
Encapsulation
- Data hiding using access control
Mixins
- Using modules as mixins
Instance Variables
- Defining and accessing instance variables
Data Abstraction
- Hiding implementation details
Ruby Exceptions
- Types of exceptions
Exception Handling
begin,rescue,ensure
Catch and Throw
- Non-local exits using
catchandthrow
Exception Handling in Threads
- Managing errors in multithreaded programs
Exception Class
- Exception class hierarchy and methods
Ruby Regex
- Pattern matching basics
Search and Replace
- Using regex for search and replace operations
Float Class
- Floating-point operations
Integer Class
- Integer operations
Symbol Class
- Symbols and their use cases
Struct Class
- Lightweight data structures
Ruby Module Basics
- Creating and using modules
Comparable Module
- Object comparison
Math Module
- Mathematical functions
Include vs Extend
- Differences and use cases
Arrays
- Creating and manipulating arrays
Strings
- String basics
- String interpolation
Hashes
- Hash basics
- Working with key-value pairs
Introduction to Threading
- Basics of multithreading
Thread Lifecycle
- Thread states and execution flow
Iterators in Ruby
- Types of iterators
Getters and Setters
- Attribute readers and writers
End of lesson.