We cover:

  • Objects: names and methods
  • Data: strings, arrays, hashes, and regular expressions
  • Control: if, while, blocks, iterators, and exceptions
  • Building blocks: classes and modules
  • YAML and marshaling
  • Common idioms that you’ll see used in this book

Chapter 4
Introduction to Ruby

Many people who are new to Rails are also new to Ruby. If you’re familiar with a language such as Java, JavaScript, PHP, Perl, or Python, you’ll find Ruby pretty easy to pick up.

This chapter isn’t a complete introduction to Ruby. It doesn’t cover topics such as precedence rules (as in most other programming languages, 1+2*3==7 in Ruby). It’s only meant to explain enough Ruby that the examples in the book make sense.

This chapter draws heavily from material in Programming Ruby [FH13]. If you think you need more background on the Ruby language (and at the risk of being grossly self-serving), we’d like to suggest that the best way to learn Ruby and the best reference for Ruby’s classes, modules, and libraries is Programming Ruby [FH13] (also known as the PickAxe book). Welcome to the Ruby community!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.83.223