Introduction to Ruby
The Basics
- First steps
- First look at Ruby
- Ruby as a calculator
- Numbers in Ruby
- Integers
- Floats
- More operators
- Very large and very
small numbers
- Exercises
- Strings
- Things you can do with strings
- More things to do with strings
- Exercises
- New names for old things
- Classes vs objects
- Class#method notation
- Converting between classes
- Exercises
- Variables
- What is a variable?
- Working with variables.
- Shortcuts
- Constans vs Variables
- Exercises
- Writing programs
- Hello World
- Another example
- Making programs executable
- Exercises
- Good programming techniques
Flow Control
- Loops
- Counting
- A sum of numbers
- Multi-line statemets
- More examples
- Countig backwards
- Counting a variable number
of times
- Exercises
- Getting user input
- That pesky newline!
- Back to our program
- Exercises
- Conditionals
- true and false
- Most common conditionals
- String comparisons
- elsif
- Example - fare_finder.rb
- Exercises
- While loops
- Counting
- Powers of 2
- Exercises
More structures
- Arrays
- What is an array?
- for loops
- Some array methods
- Iterators
- Iterators as loops
- Integer iterators
- Array iterators
- Exercises
- Hashes
- What is a hash?
- Some hash methods
- Hash iterators
- Exercises
- Method Index