O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learn to Code with Ruby

Video Description

A comprehensive introduction to coding with the Ruby programming language. Complete beginners welcome!

About This Video

  • Installation and configuration for both Mac OS and Windows systems
  • Common programming concepts (variables, arithmetic, output)
  • Objects and methods, Strings, Numbers, Booleans, Methods and Conditionals
  • Ranges, Arrays, Hashes, Blocks, Procs, and Lambdas
  • Dates and times, File Input and Output, Regular Expression
  • Classes, Modules, and Inheritance

In Detail

The most comprehensive Ruby course available. An in-depth overview of coding with Ruby, a popular programming language renowned for its simplicity and elegance. Whether you've never written a line of code before or are looking to learn a brand new language, this course covers all bases! Ruby is a language released by Yukihiro Matsumoto in 1995 that bills itself as "a programmer's best friend". Every aspect of Ruby is designed to make programming easier for the developer. There is no better first language if you're interested in learning how to program.Ruby also serves as the foundation for Ruby on Rails, a popular web framework that powers over 1.2 million websites worldwide. The course offers an extensive introduction to the base language you'll need to know if you intend to tackle web development in the future. Check out the sample videos below to get a taste of what the course has to offer! So if you're ready to commit yourself, if you're eager to expand your knowledge of programming, if you're ready to discover what makes this elegant language so loved by developers, you are ready to Learn to Code with Ruby!Thanks for checking out the course!

Table of Contents

  1. Chapter 1 : Introduction and Installation
    1. Introduction to Ruby 00:13:07
    2. Mac OS - Access and Work with the Terminal 00:10:30
    3. Mac OS - Install RVM and Install Ruby 00:18:02
    4. Mac OS - Install Atom Text Editor and Atom Runner and Custom Theme 00:09:42
    5. Mac OS - Write First Ruby File and Run with Atom Runner 00:09:35
    6. Mac OS - Run Ruby File from Terminal 00:06:08
    7. Windows - Download and Install Ruby 00:07:13
    8. Windows - Install Atom Text Editor and Atom Runner and Custom Theme 00:09:36
    9. Windows - Write First Ruby File and Run with Atom Runner 00:07:28
    10. Windows - Run Ruby File from Command Promp 00:05:09
    11. Interactive Ruby (IRB) 00:07:27
  2. Chapter 2 : Getting Started
    1. The puts Method 00:10:20
    2. The print Method 00:03:18
    3. The p Method 00:04:34
    4. Basic Arithmetic in Ruby 00:09:58
    5. Comments 00:06:34
    6. Variables 00:13:39
    7. Parallel Variable Assignment and Swapping Variable Values 00:06:52
    8. Constants 00:04:02
    9. Intro to Object Methods 00:08:08
    10. Return Values and the nil Object 00:09:14
    11. String Interpolation 00:10:25
    12. The gets Method and the chomp Method 00:15:25
  3. Chapter 3 : Numbers and Booleans
    1. Intro to Numbers and the .class Method 00:07:49
    2. Convert Numbers to Strings and Vice Versa 00:08:34
    3. Intro to Booleans 00:04:51
    4. The .odd? and .even? Predicate Methods 00:05:49
    5. Comparison with the Equality (==) Operator 00:06:42
    6. Comparison with the Inequality (!=) Operator 00:04:34
    7. Less than and Greater than Operators 00:05:16
    8. Arithmetic Methods and Basic Arguments 00:09:08
    9. Intro to Object Methods with Parameters (The .between? Predicate Method) 00:08:22
    10. Float Methods 00:06:48
    11. Assignment Operators 00:07:54
    12. Introduction to Blocks with the .times Method 00:14:33
    13. The .upto and .downto Methods 00:09:43
    14. BONUS - The .step Method 00:07:39
  4. Chapter 4 : Strings I
    1. Create a String 00:07:25
    2. Multiline Strings 00:04:02
    3. Escape Characters 00:08:04
    4. Single Quotes vs Double Quotes 00:02:21
    5. Equality and Inequality Operators with Strings 00:07:13
    6. Concatenate Strings 00:07:45
    7. The .length and .size Methods 00:06:03
    8. Extract Single Characters from String with Bracket Syntax 00:07:45
    9. Extract Multiple Characters from String with Bracket Syntax 00:04:10
    10. Extract Multiple Characters with Range Objects 00:05:54
    11. Overwrite Characters in String with Bracket Syntax 00:05:14
    12. Case Methods 00:05:44
    13. The .reverse Method on a String 00:03:11
    14. Bang Methods on Strings 00:07:20
    15. The .include? Method on a String 00:05:32
    16. The .empty? And .nil? Methods on a String 00:04:01
  5. Chapter 5 : Methods and Conditionals I
    1. Intro to Methods 00:12:58
    2. Local Variables 00:04:16
    3. Parameters and Arguments 00:09:17
    4. Return Values I 00:07:23
    5. Return Values II - Default Return Values and the Return of the puts Method 00:06:15
    6. The if Statement 00:10:19
    7. Truthiness and Falseness 00:07:06
    8. if elsif 00:09:02
    9. The else Keyword 00:08:01
    10. Multiple Conditions with && Operator 00:12:48
    11. Multiple Conditions with || Operator 00:05:10
    12. Parentheses and Precedence 00:08:33
    13. Nested if Statements 00:08:04
    14. The .respond_to? Method 00:09:30
    15. Ternary Operator 00:12:36
    16. Default or Optional Parameters 00:06:25
    17. Call A Method from Another Method or Interpolated String 00:10:36
  6. Chapter 6 : Methods and Conditionals II
    1. The case Statement 00:12:04
    2. Negation with ! 00:06:09
    3. The unless Keyword 00:07:45
    4. The while Keyword 00:15:38
    5. The until Keyword 00:04:21
    6. CHALLENGE: FizzBuzz 00:11:57
    7. Statement Modifiers / Inline Modifiers 00:05:36
    8. Conditional Assignment 00:06:34
  7. Chapter 7 : Ranges
    1. Intro to Ranges 00:07:46
    2. Alphabetical Ranges 00:05:37
    3. The .size Method on a Range 00:01:45
    4. Check if Value Exists in a Range with .includes? Method or === 00:04:25
    5. Generate A Random Number with the rand Method 00:05:58
  8. Chapter 8 : Arrays I - Creation, Addition, and Modification
    1. Introduction to Arrays 00:04:00
    2. Create An Array with Bracket Syntax 00:09:18
    3. Shorthand %w Syntax to Create an Array of Strings 00:02:11
    4. Create an Array with Array.new Method 00:03:32
    5. Access Single Array Element by Index Position 00:11:58
    6. Access Single Array Element with .fetch Method 00:04:09
    7. Extract Sequential Array Elements with Bracket Syntax 00:06:12
    8. Access Sequential Array Elements with a Range Object 00:04:01
    9. Access Multiple Array Elements with the .values_at Method 00:05:01
    10. The .slice Method 00:02:33
    11. Overwrite One or More Array Elements 00:08:06
    12. The .length, .size and .count Methods on an Array 00:04:57
    13. The .empty? and .nil? Methods on an Array 00:05:18
    14. The .first and .last Methods 00:11:12
    15. The .push Method, the Shovel Operator, and the .insert Method 00:07:04
    16. The .pop Method 00:05:15
    17. The .shift and .unshift Methods 00:03:16
    18. Equality and Inequality Operators with Arrays 00:05:06
    19. The Spaceship Operator 00:06:15
    20. Convert Ranges to Arrays with the .to_a Method 00:04:19
    21. The .is_a? Predicate Method 00:12:46
  9. Chapter 9 : Arrays II - Iteration and Various Methods
    1. The ri Program 00:07:49
    2. Review of Blocks 00:05:20
    3. The .each Method on an Array 00:07:00
    4. More Practice with the .each Method 00:13:00
    5. Each within each 00:04:03
    6. The For Loop 00:09:31
    7. The .each_with_index Method 00:06:35
    8. CHALLENGE: The .each_with_index Method 00:07:02
    9. The .map and .collect Methods on an Array 00:12:14
    10. Iteration over Array with while or until Loops 00:05:35
    11. The break Keyword 00:06:20
    12. The next Keyword 00:03:38
    13. The .reverse Method on an Array 00:02:25
    14. The .sort Method on an Array 00:05:18
    15. The .concat Method on an Array 00:04:46
    16. The .max and .min Methods on an Array 00:09:06
    17. The .include? Predicate Method on an Array 00:02:12
    18. The .index and .find_index Methods on an Array 00:02:51
    19. The .select Method on an Array 00:06:45
    20. The .reject Method on an Array 00:02:53
    21. Unpack a Multidimensional Array 00:05:45
    22. The .partition Method on an Array 00:05:05
  10. Chapter 10 : Strings II
    1. The .split Method on a String 00:05:28
    2. Iterate over String Characters 00:04:40
    3. The .join Method on an Array 00:10:31
    4. The .count Method on a String 00:06:44
    5. The .index and .rindex Methods on a String 00:12:37
    6. The .insert Method on a String 00:02:30
    7. The .squeeze Method 00:11:22
    8. The .clear Method on a String 00:01:26
    9. The .delete Method on a String 00:05:36
  11. Chapter 11 : Arrays III - Bonus Methods
    1. Object Pointers and Object Copies 00:10:30
    2. Splat Arguments 00:03:50
    3. The .any? And .all? Methods on an Array 00:04:26
    4. The .find and .detect Methods on an Array 00:05:42
    5. The .uniq Method on an Array 00:05:29
    6. The .compact Method on an Array 00:04:43
    7. The .inject and .reduce Methods on an Array 00:11:52
    8. The .flatten Method on an Array 00:03:48
    9. The .zip Method on an Array 00:07:04
    10. The .sample Method on an Array 00:03:50
    11. Multiply an Array with Asterisk Symbol 00:05:59
    12. Union - Combine Arrays and Exclude Duplicates 00:06:33
    13. Remove Array Items that Exist in another Array 00:05:52
    14. Array Intersection with the Ampersand Symbol 00:06:06
  12. Chapter 12 : Hashes I
    1. Intro to Hashes 00:07:08
    2. Create Hash and Extract Values from Hashes by their Keys 00:09:54
    3. Intro to Symbols and Symbols as Hash Keys 00:08:17
    4. Convert Symbols to Strings and Vice Versa 00:03:51
    5. The .fetch Method on a Hash 00:05:01
    6. Add a Key Value Pair to a Hash with Bracket Syntax or the .store Method 00:05:02
    7. The .length and .empty? Methods on a Hash 00:03:21
    8. The .each Method on a Hash 00:07:18
    9. The .each_key and .each_value Methods 00:07:17
    10. Retrieve Keys or Values from Hash as an Array 00:02:12
  13. Chapter 13 : Hashes II
    1. Create Hash with Default Value 00:05:37
    2. Convert Hash to Array and Vice Versa 00:05:12
    3. The .sort and .sort_by Methods on a Hash 00:06:45
    4. The .key? And .value? Methods on a Hash 00:04:34
    5. Hashes as Method Arguments 00:10:20
    6. The .delete Method on a Hash 00:03:09
    7. The .select and .reject Methods on a Hash 00:06:47
    8. The .merge Method to Combine Hashes 00:07:59
    9. CHALLENGE: Word Frequency in a Sentence String 00:09:29
  14. Chapter 14 : Blocks, Procs, and Lambdas
    1. Introduction to Blocks 00:07:50
    2. The yield Keyword 00:09:55
    3. Procs I 00:17:26
    4. The .block_given? Method 00:03:28
    5. Yielding with Arguments 00:08:37
    6. A Custom .each Method 00:08:53
    7. Procs II 00:04:15
    8. Pass a Ruby Method as Proc 00:05:53
    9. Methods with Proc Parameters 00:06:35
    10. Intro to Lambdas 00:12:52
    11. Lambda Efficiency Example 00:13:12
  15. Chapter 15 : The Time Object
    1. Intro to the Time Object 00:06:46
    2. Instance Methods on a Time Object 00:04:22
    3. Predicate Methods on Time Objects 00:04:32
    4. Add or Subtract Time by Seconds 00:08:58
    5. The Comparable Methods on a Time Object 00:06:21
    6. Convert Time Object to Other Objects 00:05:02
    7. Convert Time Object to Formatted String 00:05:32
    8. The .parse and .strptime Methods 00:07:40
  16. Chapter 16 : File Input and Output
    1. Read from a Text File with Ruby 00:04:18
    2. Write to a Text File with Ruby 00:04:48
    3. Rename and Delete a File with Ruby 00:03:39
    4. Command Line Arguments (ARGV) 00:03:41
    5. The load Method 00:04:53
    6. The require and require_relative Methods 00:07:35
  17. Chapter 17 : Regular Expressions
    1. The .start_with? and .end_with? Methods 00:15:54
    2. The .include? Method 00:10:32
    3. Intro to Regular Expressions 00:10:16
    4. The .scan Method I 00:06:27
    5. The .scan Method II 00:06:18
    6. The Wildcard Symbol 00:06:29
    7. The Backslash 00:05:32
    8. RegEx Anchors 00:04:07
    9. Exclude Characters 00:04:39
    10. The .sub and .gsub Methods with Regular Expressions 00:09:59
    11. Rubular.com 00:07:20
  18. Chapter 18 : Classes I
    1. Intro to Classes 00:11:24
    2. Review of the .class Method on Ruby Objects 00:02:54
    3. The .superclass and .ancestors Methods on a Class 00:14:32
    4. The .methods Method 00:08:27
    5. Create A Class 00:12:07
    6. Object Aliases 00:05:14
    7. Instance Variables and the .initialize Method 00:13:34
    8. Instance Methods 00:10:04
    9. Override the .to_s Method 00:05:42
    10. The self-Keyword in an Instance Method 00:05:44
    11. Getter Methods 00:10:35
    12. Setter Methods 00:10:54
    13. Shortcut Accessor Methods 00:08:36
    14. Add Parameters to initialize Method 00:07:58
  19. Chapter 19 : Modules and Mixins
    1. Intro to Modules 00:10:35
    2. Modules with Identical Methods 00:08:08
    3. Import Modules into the Current File 00:03:42
    4. The Math Module 00:02:52
    5. Mixins I - The Comparable Module 00:18:03
    6. Mixins II - Custom Mixins 00:15:24
    7. The .ancestors Method in Depth 00:09:55
    8. The prepend Keyword 00:04:12
    9. The extend Keyword 00:04:54
    10. Mixins III - The Enumerable Module 00:14:51
  20. Chapter 20 : Classes II
    1. Private Methods 00:10:28
    2. Protected Methods 00:11:40
    3. Add Validation to Setter Methods 00:09:39
    4. Prefer Instance Methods to Instance Variables 00:10:41
    5. Calling Multiple Setter Methods within one Method 00:07:56
    6. Structs 00:12:16
    7. Monkey Patching I 00:13:04
    8. Monkey Patching II 00:15:10
    9. Monkey Patching III 00:06:04
    10. Class Variables and Class Methods 00:14:26
  21. Chapter 21 : Classes III
    1. Review of Inheritance 00:04:02
    2. Create Subclasses 00:06:21
    3. Check Inheritance Hierarchy 00:06:54
    4. The .is_a? and .instance_of? Predicate Methods 00:05:22
    5. Exclusive Instance Methods in Subclasses 00:05:22
    6. Override Methods in a Subclass 00:04:52
    7. The super Keyword I 00:10:29
    8. The super Keyword II 00:08:00
    9. Class Variables across Subclasses 00:07:53
    10. Singleton Classes and Singleton Methods 00:08:29
    11. Hash as initialize Argument I 00:07:07
    12. Hash as initialize Argument II 00:09:08
  22. Chapter 22 : Reading and Writing Documentation
    1. Intro to Rubydoc Documentation 00:05:45
    2. Class Method Documentation on RubyDocs 00:05:18
    3. Use rdoc to Generate Your Own Documentation I 00:08:27
    4. Use rdoc to Generate Your Own Documentation II 00:05:47
  23. Chapter 23 : Conclusion
    1. Conclusion 00:02:04