
Learn to install Ruby on Windows and Mac, run simple programs, and master data, variables, operators, control flow, loops, methods, objects, modules, file input/output, debugging, and GUI basics.
Install ruby on windows by downloading RubyInstaller from the ruby-lang.org downloads page, selecting the current version, accepting the license, and completing the default directory installation.
Use ruby on Mac without installation by opening a terminal, starting irb for interactive mode, writing a hello world script in nano, and running it with ruby helloworld.rb.
Launch the ruby interactive shell (IRB) from command line to evaluate expressions, perform arithmetic and string operations, store variables, define functions, see last expression return a value, then exit.
Learn to run ruby scripts from a file with the .rb extension, write a simple hello world program, and execute scripts anywhere by adding ruby to your path.
Explore displaying data in Ruby using irb, puts, and print. See how puts adds a new line, how print differs, and that formatted print will be covered later.
Learn how to input data into Ruby scripts using gets, manage newlines with chomp, and convert string input to integers or floats with Integer and float.
Create ex1.rb to prompt for a name, greet the user, read two numbers with gets, convert to integers, and display their sum using concatenation and chomp to remove newlines.
Discover the Ruby string data type, using single or double quotes, escapes, and gets input; learn here documents, splitting, and squeezing to manage spaces and multi-part text.
Explore numeric operations in Ruby using irb, including binary and hexadecimal literals (0B101, 0X10), negative numbers, basic arithmetic, numbers as objects, and methods like abs and to_s.
Learn boolean data in Ruby, focusing on true and false values, with nil as a Ruby note, test comparisons in the interactive shell, and use not for negation in loops.
Learn how to define and use ranges in Ruby, with 0 through 9 and a through z, test membership, and iterate with each.
Explore arrays in Ruby to store data, distinguish from ranges, hold any collection, access elements by index, sum elements, and convert a sequence to an array.
Explore hashes, Ruby's associative structure of key-value pairs; create hashes in Ruby, retrieve values by key, and handle missing keys with nil, while previewing loops.
Create local variables and local constants in ruby, assign values, retrieve them, and follow naming rules using underscores or camel casing; constants use all uppercase.
Create a beginner Ruby program called thanks.rb that prompts for the giver, gift, recipient name, and age, chomps input, converts age to integer, and outputs a formatted thank-you note.
Store random numbers in an array, then determine the maximum and minimum values using separate loops, while learning how to generate random numbers with the rand method in Ruby.
Explore Ruby arithmetic operators, including addition, subtraction, multiplication, division, modulus, and exponent, used in binary expressions. Grasp how precedence affects results and how to use parentheses to clarify complex expressions.
Master Ruby relational operators, including equal to, not equal to, less than and greater than, and the general comparison operator for numbers and strings, with attention to case sensitivity.
Master ruby's logical operators and, or, not, and how they yield a boolean by combining expressions, with both word and C style syntax like && and !.
Explore miscellaneous Ruby expressions, including chaining assignments to initialize multiple variables to the same value, and parallel assignment for swapping without a temp. Examine the defined operator to inspect identifiers.
Translate basic formulas into ruby by performing arithmetic and enforcing precedence with parentheses. Learn exponentiation with **, square root, and absolute value via abs on x and y.
Learn to decide with Ruby by using if statements and relational expressions. Get a user grade, convert to integer, and print pass if the grade is at least 70.
Learn how to use Ruby's ifelse for two-way decisions with else and end, then extend to if else if for multiple grade ranges based on numeric scores.
Apply the if elsif else chain in Ruby to convert a numeric grade into a letter grade using 90, 80, 70, 60, and below 60, with a final else.
Discover how the Ruby case statement structures decisions with when and else, ending with end. Apply a grade example that maps scores to letter grades.
practice using nested if else statements to build a simple Ruby guessing game, prompting the user, validating the answer Watson with up to three tries, and finishing with end statements.
Create a ruby calculator using a case statement, prompting for two numbers, converting input to numbers, using chomp, and performing addition, subtraction, multiplication, and division with float precision.
Discover how while loops operate in Ruby programming using a loop control variable and a condition to repeat actions, with examples counting and summing numbers.
Explore the Ruby until loop, which runs until a condition becomes true, mirroring the while loop with examples like printing hello world five times and summing to ten.
Learn how to use Ruby iterators to traverse ranges with times, upto, and step, performing repeated tasks and computing sums without traditional while loops.
Explore the each iterator and the for-in loop to iterate over arrays, display values, and sum numbers, showing their semantic equivalence and easy syntax in Ruby.
Learn how to alter loop control in Ruby using next, redo, and break to manage iterations and exits, with practical examples and cautions.
Rewrite the guessing game using a while loop to limit attempts to three, prompting for input, trimming newlines, and exiting when the answer is correct or after three tries.
Count vowels in a user sentence with a for-in loop in ruby by taking input, converting sentence to a character array with split, then tallying a, e, i, o, u.
Define Ruby methods using def, with single or multiple parameters, and return values via expressions or return. Build square and power functions to demonstrate value returning methods, study side effects.
Examine methods that do not return values and cause side effects, such as a prompt method that displays a message and a curve method that updates grades using map.
Define methods with variable argument lists using a star parameter and apply default values for omitted arguments, demonstrated by summing numbers and computing growth.
Learn to build a simple tip calculator in Ruby by writing a top-down program that prompts for a bill, computes a 15% tip with tipCalc, and displays the total.
The lecture adds methods for addition, subtraction, multiplication, and division to the calculator program, then prompts the user for two numbers and an operation to compute the result.
Define a Ruby class to model a name as an abstract data type with first, middle, last attributes, implement initialize to assign them, and create objects with Name.new and inspect.
Define a class's to_s method to display the object's state, including first, middle, and last names. Learn simple formatting options and the default debugging string behavior.
Define a ruby class with an initializer and a toString method, then add attribute accessor methods for first, middle, and last name and use them in the main program.
Learn to make attributes writable with attr_writer and readable with attr_reader, modify and print name objects, and use class variables to count instances.
Learn how to define class variables and class methods in Ruby to track object counts across all instances, using a class method defined with self to view the total count.
Define a Ruby person class with initialize(name, age, gender) and instance variables, plus a to_s display and a birthday method that increments age, demonstrated with sample objects.
Define a Ruby student class with name, id, and a grades array; add grades, compute the average, and display results, then introduce a shape class as a base for inheritance.
Develop a Ruby shape class with x and y coordinates, including initialize, readable/writable attributes, a toString method, and a move method, to support future inheritance.
Explore inheritance in Ruby by defining is-a relationships, creating a rectangle subclass that inherits from a shape superclass, using super to initialize coordinates, and leveraging inherited toString.
Learn how to override a superclass method in a rectangle subclass by calling super toString and appending height and width, using inheritance to display x, y, height, and width.
Build a square class that inherits from rectangle and shape, ensuring equal width and height with super, and override toString to display square data. Learn how inheritance chains model shapes.
Explore inheritance in Ruby by building an employee class and a manager subclass, with constructors, pay calculation for hourly and salaried workers, and overriding pay to handle salary.
Create Ruby modules to namespace methods and constants for safe multi-file reuse. Test Celsius to Fahrenheit and Fahrenheit to Celsius conversions across files using require.
Define two Ruby modules as name spaces to hold distinct greetings, use qualified calls like Familiar.greeting and Stranger.greeting in one program, demonstrating how modules prevent name conflicts.
Explore mixins in Ruby and learn how to share constants like pi and the golden ratio in a circle class, illustrating how mixins differ from modules and support multiple inheritance.
build a Ruby module to perform add, subtract, and multiply on a list of arguments using *args, then require the module and call its methods with qualifiers.
In this Ruby training course, Infinite Skills teaches you the fundamentals of the Ruby programming language. Ruby was designed to be more powerful that Perl, and more object-oriented than Python, and has gained in popularity due to its power and ease of use. Mike will show you the basic functions and features of Ruby, and how to put them together to create powerful programs.
You will start with lessons for installing Ruby on either your Mac or PC, and how to run simple programs. This Ruby training video is designed for the absolute beginner, and no prior programming experience is necessary. Some of the topics the course covers in this video training are; working with data and variables, operators and expressions, decision making (if and case statements), loops, methods and functions and object-oriented programming. You will also learn about exception handling, reading and writing files, and working with the Ruby debugger.
In completing this computer based training course for Ruby programming, you will have a solid foundation to allow you to start creating programs using Ruby. From this starting point, you can move on to work with Ruby on Rails, or continue to hand-code your Ruby programs, but either way you will have a strong understanding of the fundamentals of the Ruby programming language. Working files are included for both courses, allowing you to follow along with the author throughout the lessons.