Useful Links
Computer Science
Programming
By Language
Ruby Programming Language
1. Introduction to Ruby
2. Ruby Syntax and Basic Concepts
3. Control Flow and Logic
4. Collections and Data Structures
5. Methods, Blocks, Procs, and Lambdas
6. Object-Oriented Programming (OOP) in Ruby
7. Advanced Ruby Concepts
8. The Ruby Ecosystem
9. Introduction to Ruby on Rails
Collections and Data Structures
Arrays
Creating Arrays
Array Literals
Array.new
Array Constructor Methods
Splitting Strings to Arrays
Accessing Elements
Indexing
Negative Indexes
Slicing
Range Access
at Method
Modifying Arrays
Adding Elements
push
<<
unshift
insert
concat
Removing Elements
pop
shift
delete
delete_at
slice!
Updating Elements
Direct Assignment
fill Method
Common Array Methods and Iteration
length and size
empty?
include?
index and rindex
sort and reverse
uniq
flatten
compact
join
map, select, reject
each_with_index
zip
Hashes
Creating Hashes
Hash Literals
Hash.new
Default Values
Using Symbols as Keys
Symbol Syntax
String vs Symbol Keys
Accessing and Assigning Values
Bracket Notation
fetch Method
dig Method
Default Value Handling
Modifying Hashes
Adding and Removing Pairs
delete and delete_if
Merging Hashes
merge and merge!
Common Hash Methods and Iteration
keys and values
each_pair
each_key and each_value
has_key? and has_value?
key? and value?
invert
select and reject
transform_keys and transform_values
Ranges
Inclusive Ranges
Double Dot Syntax
End Included
Exclusive Ranges
Triple Dot Syntax
End Excluded
Creating Ranges
Numeric Ranges
Character Ranges
Custom Object Ranges
Ranges in Conditionals and Loops
case Statements
for Loops
Membership Testing
Converting Ranges to Arrays
to_a Method
Memory Considerations
Range Methods
cover? vs include?
first and last
step Method
Sets
Creating and Using Sets
Set Class
Requiring 'set' Library
Array to Set Conversion
Set Operations
Union
Intersection
Difference
Subset and Superset
Disjoint Sets
Set Methods
add and delete
include? and member?
each and map
Previous
3. Control Flow and Logic
Go to top
Next
5. Methods, Blocks, Procs, and Lambdas